Key management method and device, SIM card, storage medium and computer program product
By layering the key system on the SIM card, using the root identifier to generate associated subkeys, the problem that SIM card cannot manage multiple pairs of keys at the same time is solved, simplifying the key management process and improving security and convenience.
Patent Information
- Application Number
- CN202411155617.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-06
AI Technical Summary
In the prior art, SIM cards cannot manage multiple pairs of keys at the same time, resulting in complex key management, and the non-correlation between keys in multiple application scenarios, making it difficult to simplify management.
By implementing a layered key system on the SIM card, using the root identifier to generate subkeys at multiple levels, ensuring that subkeys in different application scenarios are correlated, and users do not need to record and manage multiple independent subkeys, simplifying Key management process.
Multi-pair key management of SIM cards as a security management carrier is realized, reducing the complexity of key management, improving security and convenience of use, and avoiding the risk of key leakage.
Smart Images

Figure CN119095035A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a key management method and device, a subscriber identity module (SIM) card, a storage medium, and a computer program product. Background Art
[0002] In the Internet era, identity authentication based on the Public Key Infrastructure (PKI) system is widely used. When individuals use PKI digital certificates, the security protection and management of personal keys, especially personal private keys, are crucial.
[0003] At present, with the widespread use of PKI systems, different keys are usually used in different application scenarios to avoid the use of a key in multiple application scenarios, which brings the risk of overexposure. However, in the key management scheme of related technologies, a management carrier is limited to managing a pair of keys, and a management carrier cannot meet the needs of managing multiple pairs of keys at the same time; in addition, multiple application scenarios correspond to multiple independent keys, that is, there is no correlation between the keys corresponding to multiple application scenarios, which makes key management difficult. Summary of the invention
[0004] In order to solve the technical problems existing in the related technologies, the embodiments of the present application provide a key management method and device, a SIM card, a storage medium, and a computer program product.
[0005] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a key management method, which is applied to a SIM card, wherein the SIM card includes a first card application and a key module, and the method includes:
[0007] In response to a first request sent by the digital identity application through the first card application, the key module obtains the root identifier of the SIM card; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level;
[0008] Parsing the first request to obtain a discrete factor of the target level;
[0009] A subkey of the target level is generated based on the root identifier and a discrete factor of the target level.
[0010] In a second aspect, an embodiment of the present application further provides another key management method, which is applied to a SIM card, wherein the SIM card includes a first card application and a key module, and the method includes:
[0011] The first card application receives a first request sent by the digital identity application; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level;
[0012] Sending the first request to the key module, so that the key module responds to the first request, obtains the root identifier of the SIM card, parses the first request, and obtains the discrete factor of the target level; based on the root identifier and the discrete factor of the target level, generates a subkey of the target level;
[0013] A key generation result for the subkey of the target level sent by the key module is received, and the key generation result is sent to the digital identity application.
[0014] In a third aspect, an embodiment of the present application provides a key management device, which is applied to a SIM card, wherein the SIM card includes a first card application and a key module, and the device includes:
[0015] an acquisition unit, configured to acquire a root identifier of the SIM card in response to a first request sent by the digital identity application through the first card application; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level;
[0016] A parsing unit, configured to parse the first request to obtain a discrete factor of the target level;
[0017] The first generating unit is used to generate a subkey of the target level based on the root identifier and the discrete factor of the target level.
[0018] In a fourth aspect, an embodiment of the present application further provides another key management device, which is applied to a SIM card, wherein the SIM card includes a first card application and a key module, and the device includes:
[0019] A first receiving unit, configured to receive a first request sent by a digital identity application; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level;
[0020] A first sending unit, configured to send the first request to the key module, so that the key module responds to the first request, obtains the root identifier of the SIM card, parses the first request, and obtains the discrete factor of the target level; and generates a subkey of the target level based on the root identifier and the discrete factor of the target level;
[0021] A second receiving unit, configured to receive a key generation result for the subkey of the target level sent by the key module;
[0022] The second sending unit is used to send the key generation result to the digital identity application.
[0023] In a fifth aspect, an embodiment of the present application provides a SIM card, comprising: a processor and a memory for storing a computer program that can be run on the processor;
[0024] Among them, when the processor is used to run the computer program, it executes the steps of the key management method on the key module side in the SIM card described in the embodiment of the present application, or executes the steps of the key management method on the first card application side in the SIM card described in the embodiment of the present application.
[0025] In a sixth aspect, an embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the key management method on the key module side in the SIM card described in the embodiment of the present application are implemented, or the steps of the key management method on the first card application side in the SIM card described in the embodiment of the present application are implemented.
[0026] In the seventh aspect, an embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the key management method on the key module side in the SIM card described in the embodiment of the present application, or implements the steps of the key management method on the first card application side in the SIM card described in the embodiment of the present application.
[0027] The key management method and device, SIM card, storage medium, and computer program product provided in the embodiment of the present application, the SIM card includes a first card application and a key module, in response to the first request sent by the digital identity application through the first card application, the key module obtains the root identifier of the SIM card; the first request is used to request the generation of a subkey of the target level, and the first request includes a discrete factor of the target level; the first request is parsed to obtain the discrete factor of the target level; based on the root identifier and the discrete factor of the target level, the subkey of the target level is generated. The technical solution of the embodiment of the present application is adopted, and the SIM card in the terminal device is used as a security management carrier, and the SIM card is used to manage multiple pairs of keys at the same time, which can greatly facilitate the use of users; using the hierarchical key system, based on the root identifier of the SIM card, multiple levels and subkeys of different application scenarios are generated, that is, subkeys of the target level. It can be seen that the generation of subkeys of the target level in the embodiment of the present application is associated with each other, that is, subkeys of different application scenarios can be derived from a root identifier, so that there is no need to record and manage multiple independent subkeys, which greatly simplifies the management process of multiple subkeys. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1The key management method of the present invention is shown in the following figure. Figure 1 ;
[0029] Figure 2 The key management method of the present invention is shown in the following figure. Figure 2 ;
[0030] Figure 3 The key management method of the present invention is shown in the following figure. Figure 3 ;
[0031] Figure 4 A schematic diagram of the structure of a terminal device according to an embodiment of the present application;
[0032] Figure 5 A schematic diagram of hierarchical generation of subkeys according to an embodiment of the present application;
[0033] Figure 6 A schematic diagram of generating a sub-public key according to an embodiment of the present application;
[0034] Figure 7 A schematic diagram of the subkey generation process of an embodiment of the present application;
[0035] Figure 8 The process diagram of using the subkey in the embodiment of the present application is as follows: Figure 1 ;
[0036] Fig. 9 The process diagram of using the subkey in the embodiment of the present application is as follows: Figure 2 ;
[0037] Fig.10 The structure diagram of the key management device in the embodiment of the present application is as follows: Figure 1 ;
[0038] Fig.11 The structure diagram of the key management device in the embodiment of the present application is as follows: Figure 2 ;
[0039] Fig.12 This is a schematic diagram of the hardware structure of the SIM card of an embodiment of the present application;
[0040] Fig.13 A schematic diagram of the structure of the key management system according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0043] In the Internet era, identity authentication based on the PKI system is widely used. For example, bank users use U-shield to confirm user identity and conduct transactions, users use PKI digital certificates to digitally sign electronic contracts, and for example, digital collection users use account private key signatures to prove ownership of collections. In the process of personal use of PKI digital certificates, the security protection and management of personal private keys are crucial. At present, in practical applications, U-shield is usually used as a management carrier for personal private keys.
[0044] With the widespread application of the PKI system, different keys are usually used in different application scenarios to avoid the use of a certain key in multiple application scenarios, which may cause the risk of overexposure. However, this also brings the following problems: First, when users need to manage multiple sets of keys at the same time, can one management carrier manage multiple sets of keys at the same time to facilitate user use; second, are there any correlations between the generation of multiple sets of keys, and can key management be simplified; finally, when replacing the key device, can all the user's subkeys be quickly restored to avoid the user re-registering PKI and identity information in many applications.
[0045] Some key management schemes have been proposed in the related art. For example, in Scheme 1 of the related art, a blockchain digital asset key management method and system based on a SIM card is proposed. This scheme generates keys in the SIM card and supports the use of keys for calculations, but does not provide a hierarchical key management method, which is essentially different from the scheme of the present application.
[0046] In the scheme 2 of the related technology, a SIM card, a blockchain application security module, a client and a security operation method thereof are proposed. This scheme is similar to the scheme 1 of the above-mentioned related technology. It also generates keys in the SIM card and supports the use of keys for calculations, but does not provide a hierarchical key management method, which is essentially different from the scheme of the present application.
[0047] In the third scheme of the related art, a scheme for generating, storing and using private keys is proposed. The scheme stores the private keys in the encryption chip. The private keys can be generated in the chip or imported from the outside. However, the private keys in the chip cannot be exported from the chip. The content signed or decrypted using the private keys can be transmitted to the encryption chip, and the signature results and decrypted content can be sent to the outside of the encryption chip. The scheme does not describe the hierarchical keys, and there is no correlation between each key or the effect of deriving the next level key, which is essentially different from the scheme of this application.
[0048] In scheme 4 of the related technology, a digital hot wallet based on hardware encryption is proposed. This scheme is based on the digital hot wallet of hardware encryption, which stores the key in the secure storage device of the security chip, so that the private key cannot be stolen. A data processing device is set in the security chip, so that the data processing process is executed inside the security chip and cannot be monitored, thereby providing security protection for the digital wallet. However, a hierarchical key management method is not provided, which is essentially different from the scheme of the present application.
[0049] In the fifth scheme of the related art, a method and device for sharing user behavior data is proposed. The scheme uses the public key in the SIM card to construct a blockchain address, and determines the blockchain address as an anonymous identifier for the anonymous user identity; when it is detected that the user performs a participation behavior in the application, the participation behavior is used to construct shared data, and the shared data is uploaded to the blockchain network, and the shared data also includes an anonymous identifier. However, this scheme does not involve the management of a multi-layer derivable key system, which is essentially different from the scheme of this application.
[0050] In scheme six of the related technology, a secure payment verification method, device and mobile terminal are proposed. This scheme screens user health information according to different levels such as strong, weak and public, and adopts different information encryption protection methods according to different registrations, rather than a multi-layer key system management method, which is essentially different from the scheme of this application.
[0051] In scheme seven of the related art, a multi-layer key generation management method and device based on a cryptographic machine resource pool is proposed. This scheme generates a root key pair at a specified location on the root cryptographic machine as the root key of the key system. Multiple cryptographic machine resource pools jointly manage the user's device key, user key, work key and other keys, and there is no derivative effect between these keys. This scheme is more suitable for the existing cryptographic machine resource pooling and is a technology applied to cloud services. It can reduce the burden on the root cryptographic machine and achieve a good balance between the security and generation performance of the key. However, this scheme does not involve the management of a multi-layer derivable key system, which is essentially different from the scheme of this application.
[0052] Based on the above-mentioned related technical solutions, it can be seen that although some solutions use SIM cards as key generation and management carriers, they are limited to managing one pair of keys, and one management carrier cannot meet the needs of managing multiple pairs of keys at the same time; in addition, if multiple application scenarios need to use different identity keys, multiple independent key pairs need to be generated, and there is no correlation between the keys. That is, multiple application scenarios correspond to multiple independent keys, and there is no correlation between the keys corresponding to multiple application scenarios, which makes key management difficult.
[0053] Based on this, an embodiment of the present application proposes a key management method. In various embodiments of the present application, by using the SIM card in the terminal device as a security management carrier, the SIM card can realize the management of multiple pairs of keys at the same time, which can greatly facilitate the user's use; using a hierarchical key system, based on the root identifier of the SIM card, sub-keys of multiple levels and different application scenarios are generated, that is, sub-keys of the target level. It can be seen that the generation of sub-keys of the target level in the embodiment of the present application is associated with each other, that is, sub-keys of different application scenarios can be derived from a root identifier. In this way, there is no need to record and manage multiple independent sub-keys, which greatly simplifies the management process of multiple sub-keys.
[0054] The embodiment of the present application provides a key management method, which is applied to a SIM card, wherein the SIM card is set in a terminal device, and the SIM card includes a first card application and a key module. Figure 1 The key management method of the present invention is shown in the following figure. Figure 1 ;like Figure 1 As shown, the key management method includes:
[0055] Step 101: In response to a first request sent by a digital identity application through the first card application, a key module obtains a root identifier of the SIM card.
[0056] In the embodiment of the present application, the first request is used to request the generation of a subkey of a target level, and the first request includes a discrete factor of the target level. The first card application is a card application developed based on the GP specification (also referred to as the GP smart card specification) and is used to implement the organization and management of a hierarchical key system.
[0057] In actual application, the SIM card also includes one or more second card applications. Since different security domains of the SIM card have different permissions and different security domains have the characteristic of data isolation, different security domains can be used to manage the first card application and each second card application, thereby achieving the isolation effect of the first card application and each second card application.
[0058] Based on this, in one embodiment, the SIM card includes a primary security domain and one or more secondary security domains; wherein the first card application is set in the primary security domain, and each second card application is set in a different secondary security domain.
[0059] Here, the first card application can be the main digital identity management card application (which can be simply referred to as the digital identity card application), and the second card application can be a sub-credential management card application, wherein different sub-credential management card applications are set in different secondary security domains. For example, sub-credential management card application 1 can be set in secondary security domain 1, and sub-credential management card application 2 can be set in secondary security domain 2. Since different secondary security domains have the characteristics of data isolation, this can avoid the possibility of mutual trust access of information between different sub-credential management card applications, thereby further improving security.
[0060] In an embodiment of the present application, a client user (hereinafter referred to as the client) initiates a first request to a digital identity application, that is, initiates a request to generate a sub-key of a target level; after receiving the first request, the digital identity application sends the first request to a first card application, thereby sending the first request to a key module through the first card application, so that the key module responds to the first request and obtains the root identifier of the SIM card.
[0061] Here, the root identifier of the SIM card can be a random byte array, the length of which is not limited in the embodiment of the present application, and can be a sufficiently long random byte array. It should be noted that the size of the random byte array can be set according to actual needs.
[0062] In actual application, before the key module obtains the root identifier of the SIM card, the card holder identity authentication module needs to verify the card holder's identity first, so as to add a layer of protection to the management of the user's personal identity data, so that the root identifier of the SIM card obtained by the key module is safe.
[0063] Based on this, in one embodiment, the SIM card also includes a cardholder verification method (CVM) module; the obtaining of the root identifier of the SIM card includes: obtaining the root identifier of the SIM card when the authentication result indicates that the identity of the holder of the SIM card has been verified; wherein the authentication result is obtained by the first card application calling the cardholder verification module so that the cardholder verification module authenticates the identity of the holder of the SIM card based on a personal identification number (PIN) of the SIM card.
[0064] That is, in the embodiment of the present application, before the key module obtains the root identifier of the SIM card, the first card application calls the CVM module so that the CVM module authenticates the identity of the holder of the SIM card based on the PIN of the SIM card, obtains the authentication result, and feeds the authentication result back to the first card application; after receiving the authentication result, the first card application chooses whether to call the key module according to the authentication result. Specifically, when the authentication result indicates that the identity of the holder of the SIM card has passed the verification, the first card application chooses to call the key module to obtain the root identifier of the SIM card.
[0065] Here, PIN is the personal identifier of the SIM card, which is used to authenticate the identity of the card holder. Specifically, the identity of the card holder is verified by the PIN through the CVM module to confirm whether the identity of the card holder is legal. Only when the identity of the card holder is verified (indicating that the identity of the card holder is legal), the first card application corresponding to the card holder is authorized to call the key module.
[0066] Step 102: The key module parses the first request to obtain a discrete factor of the target level.
[0067] In the embodiment of the present application, after receiving the first request sent by the digital identity application through the first card application, the key module can obtain the discrete factor of the target level in the first request by parsing the first request.
[0068] Here, in actual application, when the target level is the first level, the discrete factors of the first level include one or more of the following: additional information of the master key; application scenario identifier of the first level; first offset information. When the target level is the second level or a target level greater than the second level, the discrete factors of the target level include one or more of the following: additional information of the subkey of the i-th level; application scenario identifier of the target level; second offset information, wherein i is a positive integer greater than or equal to 1, and the target level is an adjacent level greater than the i-th level. Exemplarily, when the i-th level is the second level, the target level is the third level; when the i-th level is the third level, the target level is the fourth level.
[0069] Here, the master key includes a master private key and a master public key corresponding to the master private key. The master key additional information represents the additional information generated during the master key calculation process. Specifically, the master key additional information is the bit information that exceeds the master private key during the master key generation process. For example, the calculation result of the master key generation process is 512 bits, and the length of the master private key is usually 256 bits. The first 256 bits of the calculation result are intercepted as the master private key, and the excess bit information in the calculation result that exceeds the master private key, that is, the last 256 bits in the calculation result can be used as the master key additional information. The first-level application scenario identifier can be understood as the application scenario identifier corresponding to the first-level subkey, wherein the application scenario identifier is a manually settable parameter that can be combined with the business scenario, and the business scenario identifier is used to represent the application scenario identifier. The first offset information can be understood as the offset information of the first level.
[0070] Here, the subkeys of each level include the sub-private keys of the corresponding level and the sub-public keys corresponding to the sub-private keys of the corresponding level. The additional information of the subkey of the i-th level represents the additional information generated in the calculation process of the subkey of the i-th level, i is a positive integer greater than or equal to 1, specifically, the additional information of the subkey of the i-th level is the bit information exceeding the sub-private key in the process of generating the subkey of the i-th level, for example, the calculation result of the process of generating the subkey of the i-th level is 512 bits, and the length of the sub-private key of the i-th level is usually 256 bits, then the first 256 bits of the calculation result are intercepted as the sub-private key of the i-th level, and the excess bit information exceeding the sub-private key of the i-th level in the calculation result, that is, the last 256 bits in the calculation result can be used as the additional information of the subkey of the i-th level. The target level application scenario identifier can be understood as the target level (i.e., the i-th level is the second level or other levels greater than the second level) corresponding to the application scenario identifier of the subkey, wherein the application scenario identifier is a manually settable parameter, which can be combined with the business scenario, and the business scenario identifier is used to represent the application scenario identifier. The second offset information can be understood as the offset information of the target level, i.e., the offset information of the second level or other levels greater than the second level.
[0071] Step 103: The key module generates a subkey of the target level based on the root identifier and the discrete factor of the target level.
[0072] In the embodiment of the present application, each level of subkey corresponds to a different application scenario, and different application scenarios can be represented by different application scenario identifiers.
[0073] In one embodiment, when the subkey of the target level represents the subkey of the first level, the subkey of the target level is generated based on the root identifier and the discrete factor of the target level, including: generating a master key based on the root identifier; the master key includes a master private key; generating the subkey of the first level based on the master private key and the discrete factor of the first level; the discrete factor of the first level includes one or more of the following: additional information of the master key; an application scenario identifier of the first level; and first offset information.
[0074] In the embodiment of the present application, the master key can be understood as the root key of the SIM card managed by the key module, wherein the master key is an asymmetric key. In practical applications, the master key can be a key pre-set into the card during the SIM card production process (i.e., a preset key), or a key generated after the SIM card is issued. Whether it is a preset key or a key generated after the card is issued, the master key is generated through the root identifier. Among them, the master key includes a master private key and a master public key corresponding to the master private key. Specifically, the key module first determines the master private key based on the root identifier of the SIM card, and then determines the corresponding master public key based on the master private key.
[0075] In actual application, the key module can determine the master private key based on the root identifier of the SIM card through specific operations. Among them, the method for determining the master private key based on the root identifier of the SIM card may include but is not limited to the following methods: using a hash algorithm or a symmetric encryption algorithm to perform one or more operations on the root identifier of the SIM card to obtain the master private key; or a hash algorithm and a symmetric encryption algorithm can be used in combination to perform one or more operations on the root identifier of the SIM card to obtain the master private key. It should be noted that performing one or more operations on the root identifier of the SIM card (i.e., performing several operations) is to further increase the randomness of generating the master private key.
[0076] Here, in one embodiment, the master key also includes a master public key corresponding to the master private key; the method also includes: using an elliptic curve algorithm to generate the master public key based on the master private key.
[0077] In actual application, the key module can calculate the corresponding master public key based on the master private key through the elliptic curve algorithm. Among them, the elliptic curve algorithm can include but is not limited to: SM2 algorithm (an elliptic curve public key cryptographic algorithm independently developed by China), elliptic curve digital signature algorithm (ECDSA, Elliptic Curve Digital SignatureAlgorithm), Ed25519 algorithm (an important branch of the elliptic curve digital signature algorithm).
[0078] Here, for generating the first-level subkey based on the master private key and the first-level discrete factor, specifically, the first-level subkey can be obtained by performing corresponding operations on the master private key and the first-level discrete factor through a specific operation method.
[0079] In actual application, the master private key is essentially a bit sequence, and the first-level discrete factor is essentially also a bit sequence. Then, the master private key and the first-level discrete factor are operated on these two bit sequences to obtain the first-level subkey. It can be seen that the first-level subkey is also a bit sequence. Among them, the operation method may include but is not limited to: byte splicing, bit AND / XOR operation, hash operation, encryption operation, etc. Of course, the operation method can also be a combination of the above operations, that is, two or more operations of byte splicing, bit AND / XOR operation, hash operation, and encryption operation are combined and used to operate the master private key and the first-level discrete factor to obtain the first-level subkey.
[0080] It should be noted that, since the first-level subkey is a fixed-length bit sequence, the first length (e.g., the first fixed length) in the bit sequence of the first-level subkey is selected as the first-level subprivate key, and the second length (e.g., the second fixed length) in the bit sequence of the first-level subkey is selected as the first-level subkey additional information (used as part of the discrete factor when generating the second-level subkey downward). Exemplarily, assuming that the private key length of the elliptic curve algorithm is usually 256 bits, and the length of the first-level subkey obtained by the HMAC-SHA512 method is 512 bits, then the first 256 bits of the first-level subkey are selected as the first-level subprivate key, and the second 256 bits of the first-level subkey are selected as the additional information of the subkey of this level (i.e., the first-level subkey additional information).
[0081] In another embodiment, when the subkey of the target level represents the subkey of the second level or greater than the second level, the subkey of the target level is generated based on the root identifier and the discrete factor of the target level, including: generating a master key based on the root identifier; the master key includes a master private key; generating a subkey of the first level based on the master private key and the discrete factor of the first level; the discrete factor of the first level includes one or more of the following: additional information of the master key, an application scenario identifier of the first level, and first offset information; generating a subkey of the target level based on the subprivate key in the subkey of the i-th level and the discrete factor of the target level; wherein i is a positive integer greater than or equal to 1, and the target level is an adjacent level greater than the i-th level; the discrete factor of the target level includes one or more of the following: additional information of the subkey of the i-th level; the application scenario identifier of the target level; and second offset information.
[0082] Here, for generating the subkey of the target level based on the sub-private key in the subkey of the i-th level and the discrete factor of the target level, specifically, the sub-private key in the subkey of the i-th level (i.e., the sub-private key of the i-th level) and the discrete factor of the target level can be operated accordingly through a specific operation method to obtain the subkey of the target level.
[0083] In actual application, the i-th level sub-private key is essentially a bit sequence, and the target level discrete factor is also essentially a bit sequence. Then, the i-th level sub-private key and the target level discrete factor are operated on these two bit sequences to obtain the target level sub-key. It can be seen that the target level sub-key is also a bit sequence. Among them, the operation method may include but is not limited to: byte splicing, bit AND / XOR operation, hash operation, encryption operation, etc. Of course, the operation method can also be a combination of the above operations, that is, two or more of the byte splicing, bit AND / XOR operation, hash operation, and encryption operation are combined and used to operate the i-th level sub-private key and the target level discrete factor to obtain the target level sub-key.
[0084] In actual application, in the hierarchical generation process of subkeys, the sub-private keys in each level of subkeys must be generated in the key module and saved in the key module. The sub-public keys in each level of subkeys can be generated in the key module, and the generated sub-public keys can be synchronized to the corresponding digital identity application. Of course, the digital identity application can also generate sub-public keys by itself without exposing the sub-private key information. In this way, the operation of sub-public key synchronization is reduced and the key generation process is simplified.
[0085] In one embodiment, the i-th level subkey further includes a subpublic key corresponding to the subprivate key in the i-th level subkey, and the master key further includes a master public key corresponding to the master private key;
[0086] Among them, the sub-public key of the first level is generated by the digital identity application based on the master public key and the discrete factor of the first level; when i is a positive integer greater than 1, the sub-public key of the i-th level is generated by the digital identity application based on the sub-public key of the i-1th level and the discrete factor of the i-th level.
[0087] In another embodiment, the i-th level subkey includes the i-th level subprivate key and the i-th level subpublic key;
[0088] The i-th level sub-public key is generated by the key module using an elliptic curve algorithm based on the i-th level sub-private key and returned to the digital identity application.
[0089] Here, for the first level, the sub-public key of the first level can be generated by the digital identity application. Specifically, the client synchronizes the master public key and the discrete factor of the first level to the digital identity application, and the digital identity application obtains the sub-public key of the first level based on the operation of the master public key and the discrete factor of the first level; for other levels other than the first level, the sub-public key of the i-th level is generated by the digital identity application based on the sub-public key of the i-1th level and the discrete factor of the i-th level, where i is a positive integer greater than 1. Specifically, the client synchronizes the sub-public key of the i-1th level and the discrete factor of the i-th level to the digital identity application, and the digital identity application obtains the sub-public key of the i-th level based on the operation of the sub-public key of the i-1th level and the discrete factor of the i-th level. Among them, the operation method may include but is not limited to: byte splicing, bit AND / XOR operation, hash operation, encryption operation, etc. Of course, the operation method can also be a combination of the above operations. It can be seen that on the basis of the previous level public key, that is, the master public key, and without exposing the previous level sub-private key information, the first-level sub-public key can be generated through the first-level discrete factors, which reduces the sub-public key synchronization process and makes the process simpler.
[0090] In actual application, the key module can generate the i-th level sub-public key based on the i-th level sub-private key through the elliptic curve algorithm. The elliptic curve algorithm may include but is not limited to: SM2 algorithm, ECDSA, Ed25519 algorithm.
[0091] It should be noted that the offset of each level is an integer counting from 0, and the offset value of each level can be the same, but because they are at different levels, the meanings represented by the offsets of each level are different. In addition, the first offset information and the second offset information in the embodiment of the present application can be managed by the key module. When a new subkey is generated, the first offset information and the second offset information can be generated and used in an incremental manner, and the offset used at each level is recorded in the key module. For example, when a new subkey needs to be generated, an unused minimum offset is selected at the level as the first offset information or the second offset information.
[0092] In actual application, after the key module generates the sub-key of the target level, you can choose to save the sub-private key information in the key module; you can also only record the key path information in the key module without saving the sub-private key information, thereby reducing the risk of leakage of the sub-private key information.
[0093] In actual application, after generating the subkey of the target level, the key module may first determine the target subkey to be used, and use the target subkey to perform operations on the data to be used to obtain the operation result.
[0094] Based on this, in one embodiment, after generating the subkey of the target level based on the discrete factor of the root identifier and the target level, the method further includes: in response to a second request sent by the digital identity application through the first card application, the key module determines the target subkey; the second request is used to request the use of the target subkey, and the second request includes data to be used; and using the target subkey to perform an operation on the data to be used to obtain a corresponding operation result.
[0095] Here, the client initiates a second request to the digital identity application, that is, a request to use the target subkey; after receiving the second request, the digital identity application sends the second request to the first card application, which then sends the second request to the key module through the first card application, so that the key module responds to the second request, determines the target subkey, and uses the target subkey.
[0096] Here, before the first card application sends the second request to the key module, the method further includes: calling the card holder identity authentication module so that the card holder identity authentication module authenticates the identity of the SIM card holder based on the personal identification code of the SIM card to obtain an authentication result; and receiving the authentication result fed back by the card holder identity authentication module. In one embodiment, the first card application can send the second request to the key module only when the authentication result indicates that the identity of the SIM card holder has been verified.
[0097] The following describes the process of determining the target sub-key from two aspects: a method of storing the sub-private key information and a method of not storing the sub-private key information.
[0098] In actual application, for the method of saving the sub-private key information, the key module can determine the target sub-key based on the key identifier. Among them, the key identifier can be saved in the storage module of the SIM card and used as the user's digital identity. The user's digital identity has the characteristics of randomness and business desensitization (i.e., it has no business meaning), and has the function of protecting user privacy information.
[0099] Based on this, in one embodiment, the second request also includes the key identifier of the target subkey; the determination of the target subkey includes: parsing the second request to obtain the key identifier of the target subkey; based on the key identifier and mapping table of the target subkey, searching for the target subkey from the subkeys of each target level.
[0100] In actual application, in one embodiment, before searching for the target subkey from the subkeys of each target level based on the key identifier and mapping table of the target subkey, the method also includes: generating a key identifier of the subkey of the target level based on the sub-public key corresponding to the sub-private key in the subkey of the target level; establishing and storing a mapping table between the key identifier of the subkey of each target level and the sub-private key in the subkey of each target level.
[0101] Here, for the method of saving the sub-private key information, the key module can perform a calculation operation on the sub-public key corresponding to the sub-private key in the sub-key of the target level to generate a corresponding key identifier, and then use the generated key identifier as the digital identity identifier of the user in the corresponding business scenario. Among them, the business scenario can be referred to as a business field, such as education, medical care, housing, etc. It should be noted that the key identifier can be saved in the storage module of the SIM card.
[0102] Here, the sub-public key corresponding to the sub-private key in the sub-key of the target level is operated. Specifically, the sub-public key corresponding to the sub-private key in the sub-key of the target level is operated by an operation method, wherein the operation method may include but is not limited to: hash operation, character encoding conversion operation, fixed bit length interception and modulus calculation methods. Of course, the operation method may also be a combination of the above operations.
[0103] That is to say, a mapping table between the key identifiers of the subkeys of each target level and the sub-private keys in the subkeys of each target level is pre-established, and the mapping table is saved in the key module. Each subsequent time the user wants to use the subkey (target subkey), he only needs to enter the key identifier and search the pre-established mapping table for the sub-private key corresponding to the input key identifier to obtain the target subkey.
[0104] In actual application, for the method of not saving the sub-private key information, the key module can determine the target sub-key based on the key path information. Among them, the key path information can be saved in the storage module of the SIM card, and the key path information includes one or more of the following: the level number of each level of the key upward, the application scenario identifier, and the offset.
[0105] Based on this, in one embodiment, the second request also includes key path details; the determination of the target subkey includes: parsing the second request to obtain the key path details; the key path details include an application scenario identifier of the corresponding level; and determining the corresponding target subkey based on the key path details.
[0106] Here, in actual application, after determining the target subkey, the key module can use the target subkey to perform calculation operations on the data to be used, where the data to be used may include but is not limited to: data to be signed, data to be decrypted; the calculation operations may include but are not limited to: signing operations, decryption operations.
[0107] Based on this, in one embodiment, the use of the target subkey to perform a calculation operation on the data to be used to obtain a corresponding calculation result includes one of the following:
[0108] In the case where the data to be used includes data to be signed, using the target subkey to perform a signing operation on the data to be signed to obtain corresponding signature data;
[0109] In the case where the data to be used includes data to be decrypted, the data to be decrypted is decrypted using the target subkey to obtain corresponding plaintext data.
[0110] In actual application, after generating the subkey of the target level, the key module may return the key generation result of the subkey of the target level to the digital identity application through the first card application.
[0111] Based on this, in one embodiment, after generating the subkey of the target level based on the root identifier and the discrete factor of the target level, the method further includes: sending the key generation result for the subkey of the target level to the first card application, so that the first card application sends the key generation result to the digital identity application; wherein the key generation result includes one or more of the following: the key identifier of the subkey of the target level; the key path information of the subkey of the target level; the sub-public key in the subkey of the target level.
[0112] Here, in actual application, after the key module sends the key generation result for the subkey of the target level to the first card application, the first card application can call the storage module to make the storage module save the key generation result and return the saved result to the first card application.
[0113] Accordingly, an embodiment of the present application further provides another key management method, which is applied to a SIM card, wherein the SIM card is arranged in a terminal device, and the SIM card includes a first card application and a key module. Figure 2 The key management method of the present invention is shown in the following figure. Figure 2 ;like Figure 2 As shown, the key management method includes:
[0114] Step 201: A first card application receives a first request sent by a digital identity application.
[0115] In an embodiment of the present application, the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level.
[0116] In actual application, when the target level is the first level, the discrete factors of the first level include one or more of the following: additional information of the master key; application scenario identifier of the first level; first offset information. When the target level is the second level or a target level greater than the second level, the discrete factors of the target level include one or more of the following: additional information of the subkey of the i-th level; application scenario identifier of the target level; second offset information, wherein i is a positive integer greater than or equal to 1, and the target level is an adjacent level greater than the i-th level. Exemplarily, when the i-th level is the second level, the target level is the third level; when the i-th level is the third level, the target level is the fourth level.
[0117] Step 202: The first card application sends the first request to the key module, so that the key module responds to the first request, obtains the root identifier of the SIM card, parses the first request, and obtains the discrete factor of the target level; based on the root identifier and the discrete factor of the target level, generates the subkey of the target level.
[0118] It should be noted that the specific process of the key module generating the sub-key of the target level can be understood by referring to the aforementioned key management method on the key module side, which will not be described in detail here.
[0119] In actual application, before the first card application sends the first request to the key module, the cardholder identity authentication module needs to verify the cardholder's identity to add a layer of protection to the management of the user's personal identity data, so that the sending of the first request is secure.
[0120] Based on this, in one embodiment, the SIM card also includes a card holder identity authentication module; before sending the first request to the key module, the method also includes: calling the card holder identity authentication module so that the card holder identity authentication module authenticates the identity of the SIM card holder based on the personal identification code of the SIM card to obtain an authentication result; and receiving the authentication result sent by the card holder identity authentication module.
[0121] Here, the personal identification code is the personal identifier of the SIM card, which is used to authenticate the identity of the card holder. Specifically, the personal identification code is used to verify the identity of the card holder through the card holder identity authentication module to confirm whether the identity of the card holder is legal, and only when the identity of the card holder is verified (indicating that the identity of the card holder is legal), the first card application corresponding to the card holder is authorized to send the first request.
[0122] In one embodiment, sending the first request to the key module includes: sending the first request to the key module if the authentication result indicates that the identity of the holder of the SIM card is verified.
[0123] Step 203: The first card application receives the key generation result for the subkey of the target level sent by the key module, and sends the key generation result to the digital identity application.
[0124] In actual application, after the key module generates the subkey of the target level, it can return the key generation result for the subkey of the target level to the digital identity application through the first card application. And after receiving the key generation result, the first card application can save the key generation result by calling the storage module in the SIM card.
[0125] Based on this, in one embodiment, the SIM card also includes a storage module; after receiving the key generation result for the subkey of the target level sent by the key module, the method also includes: calling the storage module so that the storage module stores the key generation result; the key generation result includes one or more of the following: the key identifier of the subkey of the target level; the key path information of the subkey of the target level; the sub-public key in the subkey of the target level; receiving the storage response result sent by the storage module.
[0126] Here, in actual application, after the key module sends the key generation result for the subkey of the target level to the first card application, the first card application can call the storage module to make the storage module save the key generation result and return the saved result (i.e., storage response result) to the first card application.
[0127] The embodiment of the present application also provides another key management method, which is applied to a SIM card, wherein the SIM card includes a first card application and a key module. Figure 3 The key management method of the present invention is shown in the following figure. Figure 3 ;like Figure 3 As shown, the key management method includes:
[0128] Step 301: A first card application receives a first request sent by a digital identity application.
[0129] In an embodiment of the present application, the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level.
[0130] In actual application, when the target level is the first level, the discrete factors of the first level include one or more of the following: additional information of the master key; application scenario identifier of the first level; first offset information. When the target level is the second level or a target level greater than the second level, the discrete factors of the target level include one or more of the following: additional information of the subkey of the i-th level; application scenario identifier of the target level; second offset information, where i is a positive integer greater than or equal to 1, and the target level is an adjacent level greater than the i-th level.
[0131] Step 302: The first card application sends the first request to the key module.
[0132] Step 303: The key module obtains the root identifier of the SIM card in response to the first request.
[0133] Step 304: The key module parses the first request to obtain a discrete factor of the target level; and generates a subkey of the target level based on the root identifier and the discrete factor of the target level.
[0134] Step 305: The key module sends the key generation result of the subkey of the target level to the first card application.
[0135] In an embodiment of the present application, the key generation result includes one or more of the following: the key identifier of the subkey of the target level; the key path information of the subkey of the target level; the sub-public key in the subkey of the target level.
[0136] Step 306: The first card application receives the key generation result sent by the key module, and sends the key generation result to the digital identity application.
[0137] It should be noted that the specific process of the first card application and the key module completing the key management has been described in detail above and will not be repeated here.
[0138] By adopting the technical solution of the embodiment of the present application, the SIM card in the terminal device is used as a security management carrier, and the SIM card is used to manage multiple pairs of keys at the same time, which can greatly facilitate the use of users; using the hierarchical key system, sub-keys of multiple levels and different application scenarios are generated based on the root identifier of the SIM card, that is, sub-keys of the target level. It can be seen that the generation of sub-keys of the target level in the embodiment of the present application is associated with each other, that is, sub-keys of different application scenarios can be derived from one root identifier. In this way, there is no need to record and manage multiple independent sub-keys, which greatly simplifies the management process of multiple sub-keys.
[0139] The present application is described below in conjunction with application examples.
[0140] In view of the fact that the related technologies are limited to managing only one pair of keys, and one management carrier cannot meet the needs of managing multiple pairs of keys at the same time; and multiple application scenarios correspond to multiple independent keys, and there is no correlation between the keys corresponding to multiple application scenarios, which makes key management difficult, this application proposes a technical solution for managing a hierarchical key system using a SIM card (corresponding to the aforementioned key management method), relying on the SIM card as a security management carrier to ensure the security of the generation, storage, and use of subkeys at different levels and in different application scenarios; at the same time, based on the hierarchical key system and based on a root identifier, subkeys of multiple levels and different application scenarios can be derived according to the scenario (corresponding to the aforementioned subkeys of the target level). Compared with multiple independent subkeys in the related technologies, this application can solve the problem of users being able to restore multiple digital identity keys after changing SIM cards, making it easier for users to manage multiple subkeys. In addition, since the sub-keys of each application scenario can be derived from the same root identifier, the sub-private keys in each sub-key do not need to be stored in the SIM card. Instead, they can be derived and used hierarchically each time they are used, which can save storage space on the SIM card. At the same time, by not saving the sub-private keys, the risk of leakage of the sub-private keys can be further reduced, thereby improving the security of key management.
[0141] The key management method proposed in this application can be applied to a SIM card, which is set in a terminal device. Figure 4 is a schematic diagram of the structure of the terminal device according to an embodiment of the present application, such as Figure 4 As shown, the terminal device (referred to as the terminal) includes a digital identity APP (corresponding to the aforementioned digital identity application) and a SIM card, wherein the main modules of the SIM card include: a digital identity card application (corresponding to the aforementioned first card application), an identification storage module (corresponding to the aforementioned storage module), a hierarchical key system module (corresponding to the aforementioned key module), and a CVM module. The functions of these modules are described in detail below.
[0142] Digital identity APP can be understood as an APP running on the terminal, such as an Android application, which allows users to maintain the keys managed in the SIM card through an interface. The digital identity APP interacts with the digital identity card application of the SIM card through the Open Mobile Alliance (OMA) interface and uses the SIM card to manage the user's personal key system.
[0143] The digital identity card application can be understood as a card application developed based on the GP specification, which realizes the overall management of the hierarchical key system, including root identification management, discrete factor management of each level, etc. The digital identity card application realizes the function of saving key identifications and discrete factors of each level by calling the identification storage module, realizes the function of generating, signing, decrypting operations of subkeys of each level by calling the hierarchical key system module, and realizes the function of confirming the identity of the cardholder by calling the CVM module.
[0144] The CVM module is a module provided by the SIM card for verifying the cardholder's identity. When the digital identity card application maintains the subkey of the user's personal digital identity, it is necessary to first verify the PIN through the CVM module, adding a layer of protection to the management of personal identity data.
[0145] The identification storage module is used to store the discrete factor information and key identification information of each level used in the hierarchical key system. The discrete factor information includes but is not limited to: additional information generated during the calculation of the previous level key (i.e., the additional information of the previous level subkey), the application scenario identification of the next level, and the offset. Among them, the additional information generated during the calculation of the previous level key can be understood as the redundant bit information exceeding the private key during the generation of the previous level key (for example, if the calculation result of the previous level key is 512 bits, and the length of the private key is usually 256 bits, then the first 256 bits of the calculation result are intercepted as the private key, and the last 256 bits of the calculation result are intercepted as the additional information). The additional information generated during the calculation of the previous level key brings randomness to the generation of the next level subkey, which can improve the security of the next level subkey. Among them, the application scenario identification of the next level is a parameter that can be set manually, which can be combined with the business scenario and represented by the business scenario identification. The offset is a non-repeating integer and can be managed in an incremental counting manner. The key identification information can be understood as the digital identity of the user in the corresponding application scenario, which can be stored in the identification storage module. In actual application, the sub-public key can be operated through an operation method to obtain the key identification information of the corresponding level, where the operation method includes but is not limited to commonly used hashing algorithms, character encoding conversion, truncation of fixed bit length and modulus calculation methods, and the above methods can also be used in combination.
[0146] The hierarchical key system module is used to realize the hierarchical generation of subkeys based on the elliptic curve algorithm. Among them, the elliptic curve algorithm includes but is not limited to: SM2, ECDSA, Ed25519 and other algorithms. The hierarchical key system module needs to manage the root key (asymmetric key, corresponding to the aforementioned master key) of the SIM card. The root key can be pre-set into the card during the card making process, or generated by the card after the card is issued. Whether it is a pre-set key or generated after the card is issued, the root key is generated by the root identifier of the SIM card. Among them, the root identifier is a sufficiently long random byte array. Through specific operations, the master private key is calculated based on the root identifier, and the master public key corresponding to the master private key is calculated through the elliptic curve algorithm. It should be noted that the method for calculating the master private key based on the root identifier includes but is not limited to: using a hash algorithm or a symmetric encryption algorithm to perform several operations on the root identifier to obtain the master private key; the above two algorithms can also be combined to perform several operations on the root identifier to obtain the master private key. The root identifier is calculated several times to further increase the randomness of the generated master private key.
[0147] Figure 5 This is a schematic diagram of the hierarchical generation of subkeys in an embodiment of the present application, such as Figure 5 As shown, the hierarchical key system module can be based on the previous level key, combined with the discrete factor (including but not limited to the additional information generated in the calculation process of the previous level key, the application scenario identifier of the next level, and the offset), and obtain the subkey of the corresponding position of the next level through calculation. For example, the discrete factor can be the additional information generated in the calculation process of the previous level key (such as the additional information of the master key), or the additional information can be combined with the application scenario identifier of the next level key and the offset i (the offset of the i-th level, i is a positive integer greater than or equal to 1) to generate the discrete factor of the next level key. If used in the metaverse scenario, the agreed identifier of the metaverse can be used as the application scenario identifier. The additional information generated in the calculation process of the previous level key can provide greater randomness on the basis of the certainty of the generation of the next level key, ensuring that the calculation factors of the next level key generation of each personal key are different. The offset is a non-repeating integer, which is convenient for managing the use of the next level key. The calculation process of the next level subkey is to use a hash algorithm or a symmetric encryption algorithm to perform a number of operations on the root identifier, or the two algorithms can be used in combination.
[0148] In the hierarchical generation process of subkeys, the subprivate key must be generated in the hierarchical key system module of the SIM card and saved in the hierarchical key system module. The subpublic key can be generated in the hierarchical key system module of the SIM card and synchronized to the corresponding application (i.e. digital identity APP); or Figure 6The schematic diagram of the generation of the sub-public key shown in the figure is that the application generates sub-public keys of each level, and the client synchronizes the upper-level public key and the lower-level discrete factor to the application. The application generates the lower-level sub-public key based on the upper-level public key and the lower-level discrete factor (including the sub-key offset agreed by both parties). In this application, the public and private keys are generated using the elliptic curve algorithm, which is based on the mathematical properties of the group. The sub-public key can be generated by deducing the discrete factor based on the upper-level public key without the upper-level private key. In this way, when the sub-public key is generated by the application, the private key information will not be exposed, and the sub-public key synchronization process is reduced, making the process simpler.
[0149] After generating the subkeys of each level, the hierarchical key system module can choose to save the sub-private key information in the module, or record the key path information without saving the sub-private key information. For the method of saving the sub-private key, the sub-public key corresponding to the sub-private key can be used to perform calculations, generate a key identifier, establish a mapping table based on the correspondence between the key identifier and the sub-private key, and save the mapping table in the module, and return the key identifier of the generated key. Then, each time the subkey (corresponding to the aforementioned target subkey) is used, the user only needs to enter the key identifier, the hierarchical key system module finds the corresponding sub-private key through the mapping table, and uses the sub-private key to perform calculation operations on the data to be used. For the method of not saving the sub-private key, when using the subkey, the user needs to use the key path information as a parameter so that the hierarchical key system module can generate the subkey in real time based on the key path information, and then use the subkey for calculation. Among them, the key path information includes but is not limited to: the level number of each level of the key upward, the application scenario identifier, and the offset.
[0150] It should be noted that if the method of saving the sub-private key is adopted, the key identifier can be saved in the identification storage module of the SIM card and used as the user's digital identity identifier. This identifier has no business meaning and has the function of protecting user privacy information; if the method of not saving the sub-private key is adopted, the key path information needs to be saved in the identification storage module of the SIM card.
[0151] When the hierarchical key system module generates the next-level subkey, the parameters to be provided include but are not limited to: the previous-level key path information, the next-level key application scenario identifier and the offset. The previous-level key path information includes the level number, application scenario identifier and offset of each level of the key upward. After the hierarchical key system module generates the subkey, it returns information to the digital identity card application, wherein the returned information includes but is not limited to: the subkey generation result, key identifier, and sub-public key information.
[0152] When the hierarchical key system module uses a certain subkey (corresponding to the aforementioned target subkey) to perform a signing operation or a decryption operation, the parameters to be provided include but are not limited to: key path information or key identification, and data to be used (including data to be signed or data to be decrypted). Among them, the key path information or key identification is used by the hierarchical key system module to determine the subkey to be used. After determining the subkey to be used, the hierarchical key system module uses the subkey to sign the data to be signed, or uses the subkey to decrypt the data to be decrypted, and returns the signed data or the decrypted plaintext data.
[0153] Furthermore, the present application can also be used in the field of cryptocurrency, using keys to protect the digital assets of cryptocurrency accounts. In addition, in order to further improve security, in the field of cryptocurrency, asset management can be performed by generating a new subkey each time, that is, each time a currency transaction is performed, only the offset information is modified, and other discrete factors remain unchanged. In this improved solution, the original key can be invalidated after each currency transaction, and the user uses a new key to protect his digital assets each time, further improving the randomness of the generation of the new subkey, thereby improving the security of asset protection.
[0154] The following is an explanation of the relevant processes of the hierarchical key system.
[0155] Figure 7 Schematic diagram of the subkey generation process of the embodiment of the present application, such as Figure 7 As shown, the subkey generation process specifically includes the following steps:
[0156] Step 1: The client initiates a subkey generation request (corresponding to the aforementioned first request) through the digital identity APP, and the digital identity APP sends the request to the digital identity card application;
[0157] Step 2: The digital identity card application calls the CVM module to perform cardholder identity authentication, obtains the cardholder identity authentication result, and returns the cardholder identity authentication result to the digital identity card application;
[0158] Here, the identity confirmation method may be verification such as a PIN code.
[0159] Step 3: After receiving the cardholder's identity authentication result, if the authentication is successful, the digital ID card application calls the hierarchical key system module to generate a subkey, and the calling parameters include but are not limited to: the previous level key path information, the previous level key additional information, the application scenario identifier, and the offset;
[0160] Step 4: The hierarchical key system module generates subkeys of each level through calculation;
[0161] Step 5: The hierarchical key system module establishes a mapping table based on the mapping relationship between the key identifier of the subkey and the sub-private key, and saves the mapping table in the hierarchical key system module. If the sub-private key is not saved, this step is skipped;
[0162] Step 6: The digital identity card application receives the key generation result for the subkey returned by the hierarchical key system module, and calls the identification storage module to save the key identification and key path information in the key generation result;
[0163] Here, the key generation result includes but is not limited to: key path information of the subkey, key identifier of the subkey, and sub-public key.
[0164] Step 7: The digital identity card application receives the saving result returned by the identification storage module and returns the key generation result to the digital identity APP.
[0165] Figure 8 The process diagram of using the subkey in the embodiment of the present application is as follows: Figure 1 ,like Figure 8 As shown, the process of using the subkey corresponds to the method of saving the subprivate key, and the process of using the subkey specifically includes the following steps:
[0166] Step 1: The client initiates a subkey usage request (corresponding to the aforementioned second request) through the digital identity APP, and the digital identity APP sends the request to the digital identity card application;
[0167] Here, key usage includes a signing operation or a decryption operation.
[0168] Step 2: The digital identity card application calls the CVM module to perform cardholder identity authentication, obtains the cardholder identity authentication result, and returns the cardholder identity authentication result to the digital identity card application;
[0169] Here, the identity confirmation method may be verification such as a PIN code.
[0170] Step 3: After receiving the cardholder's identity authentication result, if the authentication is successful, the digital ID card application calls the hierarchical key system module to use the key, and the request parameters include but are not limited to: key identification, data to be used (including data to be signed or data to be decrypted);
[0171] Step 4: The hierarchical key system module retrieves the subkey (corresponding to the aforementioned target subkey) through the key identifier;
[0172] Step 5: The hierarchical key system module uses the retrieved subkey to sign or decrypt the data to be used, obtains the key operation result, and returns the key operation result to the digital identity card application;
[0173] Here, the key operation result includes but is not limited to: signature data or plaintext data.
[0174] Step 6: The digital identity card application receives the key calculation result returned by the hierarchical key system module and returns the key calculation result to the digital identity APP.
[0175] Fig. 9 The process diagram of using the subkey in the embodiment of the present application is as follows: Figure 2 ,like Fig. 9 As shown, the process of using the subkey corresponds to the method of not saving the subprivate key, and the process of using the subkey specifically includes the following steps:
[0176] Step 1: The client initiates a subkey usage request (corresponding to the aforementioned second request) through the digital identity APP, and the digital identity APP sends the request to the digital identity card application.
[0177] Here, key usage includes a signing operation or a decryption operation.
[0178] Step 2: The digital identity card application calls the CVM module to perform cardholder identity authentication, obtains the cardholder identity authentication result, and returns the cardholder identity authentication result to the digital identity card application;
[0179] Here, the identity confirmation method may be verification such as a PIN code.
[0180] Step 3: After receiving the cardholder's identity authentication result, if the authentication is successful, the digital identity card application calls the identity storage module to obtain the key path details;
[0181] Step 4: The identification storage module retrieves the key path details at each level and returns them to the digital identity card application;
[0182] Here, the returned key path detailed information includes but is not limited to application scenario identifiers and offsets at each level.
[0183] Step 5: The digital ID card application receives the key path details returned by the identification storage module, and calls the hierarchical key system module to use the key, and the request parameters include but are not limited to: key path details, data to be used (including data to be signed or data to be decrypted);
[0184] Step 6: The hierarchical key system module generates a corresponding subkey (corresponding to the aforementioned target subkey) through the key path detailed information;
[0185] Step 7: The hierarchical key system module uses the subkey to sign or decrypt the data to be used, obtains the key operation result, and returns the key operation result to the digital identity card application;
[0186] Here, the key operation result includes but is not limited to: signature data or plaintext data.
[0187] Step 8: The digital identity card application receives the key calculation result returned by the hierarchical key system module and returns the key calculation result to the digital identity APP.
[0188] Compared with the key management method of the related art, the key management scheme of the present application has the following beneficial effects:
[0189] (1) Use SIM cards to manage the user hierarchical key system, and unlimited subkeys can be generated based on the root identifier. Compared with the traditional method, the subkey information generated to the lower level is related, that is, it can all be derived from the root identifier. When different key requirements are required in multiple application scenarios, it is convenient for users to manage multiple groups of keys. When the user changes the device, all the user's identity information is derived based on the root identifier, and the user does not need to change the identity information.
[0190] (2) Private key information does not need to be stored in the SIM card, reducing the risk of key leakage. Each time it is used, it is derived based on the root identifier and the application scenario identifiers at each level to dynamically generate subkeys.
[0191] (3) Based on the sub-public key information at each level, the user's digital identity can be obtained through calculation. The identity has the characteristics of randomness and business desensitization, which facilitates better protection of personal privacy.
[0192] (4) Based on the elliptic curve key algorithm, each level of sub-public key can be generated by the application based on the previous level public key and discrete factors without exposing the private key. This method reduces the operation of public key synchronization and simplifies the key management process when users use many derived sub-keys.
[0193] In order to implement the key management method on the key module side in the SIM card of the embodiment of the present application, the embodiment of the present application also provides a key management device, which is arranged on the key module in the SIM card, and the SIM card also includes a first card application, Fig.10 The structure diagram of the key management device in the embodiment of the present application is as follows: Figure 1 ,like Fig.10 As shown, the device comprises:
[0194] The acquisition unit 1001 is used to acquire the root identifier of the SIM card in response to a first request sent by the digital identity application through the first card application; the first request is used to request to generate a subkey of a target level, and the first request includes a discrete factor of the target level;
[0195] A parsing unit 1002, configured to parse the first request to obtain a discrete factor of the target level;
[0196] The first generating unit 1003 is used to generate a subkey of the target level based on the root identifier and the discrete factor of the target level.
[0197] In one embodiment, the subkey of the target level represents the subkey of the first level; the first generation unit 1003 is specifically used to: generate a master key based on the root identifier; the master key includes a master private key; based on the master private key and the discrete factors of the first level, generate the subkey of the first level; the discrete factors of the first level include one or more of the following: additional information of the master key; an application scenario identifier of the first level; and first offset information.
[0198] In one embodiment, the master key also includes a master public key corresponding to the master private key; the device also includes: a second generation unit, configured to generate the master public key based on the master private key using an elliptic curve algorithm.
[0199] In another embodiment, the subkey of the target level represents the subkey of the second level or greater than the second level; the first generation unit 1003 is specifically used to: generate a master key based on the root identifier; the master key includes a master private key; generate a subkey of the first level based on the master private key and a discrete factor of the first level; the discrete factor of the first level includes one or more of the following: additional information of the master key, an application scenario identifier of the first level, and first offset information; generate a subkey of the target level based on the subprivate key in the subkey of the i-th level and the discrete factor of the target level; wherein i is a positive integer greater than or equal to 1, and the target level is an adjacent level greater than the i-th level; the discrete factor of the target level includes one or more of the following: additional information of the subkey of the i-th level; the application scenario identifier of the target level; and second offset information.
[0200] In one embodiment, the i-th level subkey also includes a sub-public key corresponding to the sub-private key in the i-th level subkey, and the master key also includes a master public key corresponding to the master private key; wherein the first-level sub-public key is generated by the digital identity application based on the master public key and the discrete factor of the first level; when i is a positive integer greater than 1, the i-th level sub-public key is generated by the digital identity application based on the i-1-th level sub-public key and the i-th level discrete factor.
[0201] In another embodiment, the i-th level sub-key includes the i-th level sub-private key and the i-th level sub-public key; wherein the i-th level sub-public key is generated by the key module using an elliptic curve algorithm based on the i-th level sub-private key and returned to the digital identity application.
[0202] In one embodiment, the SIM card further includes a card holder identity authentication module; the acquisition unit 1001 is specifically used to: when the authentication result indicates that the identity of the SIM card holder has been verified, obtain the root identifier of the SIM card; wherein the authentication result is obtained by the first card application calling the card holder identity authentication module so that the card holder identity authentication module authenticates the identity of the SIM card holder based on the personal identification code of the SIM card.
[0203] In one embodiment, the device further comprises:
[0204] a determining unit, configured to determine a target subkey in response to a second request sent by the digital identity application through the first card application after the first generating unit 1003 generates the subkey of the target level based on the root identifier and the discrete factor of the target level, wherein the second request is used to request to use the target subkey, and the second request includes data to be used;
[0205] The operation unit is used to perform an operation on the data to be used using the target subkey to obtain a corresponding operation result.
[0206] In one embodiment, the second request also includes a key identifier of the target subkey; the determination unit is specifically used to: parse the second request to obtain the key identifier of the target subkey; and search for the target subkey from the subkeys of each target level based on the key identifier and mapping table of the target subkey.
[0207] In one embodiment, the device further comprises:
[0208] a third generating unit, configured to generate a key identifier of the subkey of the target level based on a subpublic key corresponding to a subprivate key in the subkey of the target level before the determining unit searches for the target subkey from the subkeys of each target level based on the key identifier of the target subkey and the mapping table;
[0209] The establishing unit is used to establish and store a mapping table between the key identifiers of the subkeys of each target level and the sub-private keys in the subkeys of each target level.
[0210] In another embodiment, the second request also includes key path detailed information; the determination unit is specifically used to: parse the second request to obtain the key path detailed information; the key path detailed information includes an application scenario identifier of the corresponding level; and determine the corresponding target subkey based on the key path detailed information.
[0211] In one embodiment, the computing unit is specifically used for one of the following:
[0212] In the case where the data to be used includes data to be signed, using the target subkey to perform a signing operation on the data to be signed to obtain corresponding signature data;
[0213] In the case where the data to be used includes data to be decrypted, the data to be decrypted is decrypted using the target subkey to obtain corresponding plaintext data.
[0214] In one embodiment, the device further comprises:
[0215] The third sending unit is used to send the key generation result for the subkey of the target level to the first card application after the first generating unit 1003 generates the subkey of the target level based on the root identifier and the discrete factor of the target level, so that the first card application sends the key generation result to the digital identity application; wherein the key generation result includes one or more of the following: the key identifier of the subkey of the target level; the key path information of the subkey of the target level; the sub-public key in the subkey of the target level.
[0216] In actual application, the acquisition unit 1001 can be implemented by a communication interface in the key management device, and the parsing unit 1002 and the first generating unit 1003 can be implemented by a processor in the key management device.
[0217] It should be noted that: the key management device provided in the above embodiment only uses the division of the above program modules as an example when performing key management. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the key management device provided in the above embodiment and the key management method embodiment on the key module side in the SIM card belong to the same concept. The specific implementation process is detailed in the key management method embodiment on the key module side in the SIM card, which will not be repeated here.
[0218] In order to implement the key management method on the first card application side in the SIM card of the embodiment of the present application, the embodiment of the present application also provides another key management device, which is arranged on the first card application in the SIM card, and the SIM card also includes a key module, Fig.11 The structure diagram of the key management device in the embodiment of the present application is as follows: Figure 2 ,like Fig.11 As shown, the device comprises:
[0219] The first receiving unit 1101 is used to receive a first request sent by a digital identity application; the first request is used to request to generate a subkey of a target level, and the first request includes a discrete factor of the target level;
[0220] The first sending unit 1102 is configured to send the first request to the key module, so that the key module responds to the first request, obtains the root identifier of the SIM card, parses the first request, and obtains the discrete factor of the target level; and generates a subkey of the target level based on the root identifier and the discrete factor of the target level;
[0221] The second receiving unit 1103 is used to receive the key generation result of the subkey of the target level sent by the key module;
[0222] The second sending unit 1104 is configured to send the key generation result to the digital identity application.
[0223] In one embodiment, the SIM card further comprises a card holder identity authentication module; the device further comprises:
[0224] a first calling unit, configured to call the card holder identity authentication module before the first sending unit 1102 sends the first request to the key module, so that the card holder identity authentication module authenticates the identity of the SIM card holder based on the personal identification code of the SIM card to obtain an authentication result;
[0225] The third receiving unit is used to receive the authentication result sent by the card holder identity authentication module.
[0226] In one embodiment, the first sending unit 1102 is specifically configured to: send the first request to the key module when the authentication result indicates that the identity of the holder of the SIM card is verified.
[0227] In one embodiment, the SIM card further includes a storage module; the device further includes:
[0228] a second calling unit, configured to call the storage module after the second receiving unit 1103 receives the key generation result for the subkey of the target level sent by the key module, so that the storage module stores the key generation result; the key generation result includes one or more of the following: a key identifier of the subkey of the target level; key path information of the subkey of the target level; a sub-public key in the subkey of the target level;
[0229] The fourth receiving unit is used to receive the storage response result sent by the storage module.
[0230] In actual application, the first receiving unit 1101, the first sending unit 1102, the second receiving unit 1103 and the second sending unit 1104 can be implemented by a communication interface in the key management device.
[0231] It should be noted that: the key management device provided in the above embodiment only uses the division of the above program modules as an example to illustrate when performing key management. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the key management device provided in the above embodiment and the key management method embodiment on the first card application side of the SIM card belong to the same concept. The specific implementation process is detailed in the key management method embodiment on the first card application side of the SIM card, which will not be repeated here.
[0232] Based on the hardware implementation of the above program module, and in order to implement the key management method of the embodiment of the present application, the embodiment of the present application also provides a SIM card, Fig.12 FIG. 1 is a schematic diagram of the hardware structure of the SIM card of the embodiment of the present application. Fig.12 As shown, the SIM card 1200 includes:
[0233] Communication interface 1201, capable of exchanging information with other devices;
[0234] The processor 1202 is connected to the communication interface 1201 to realize information interaction with other devices, and is used to execute the key management method provided by one or more technical solutions on the key module side of the above-mentioned SIM card, or execute the key management method provided by one or more technical solutions on the first card application side of the above-mentioned SIM card when running the computer program, and the computer program is stored in the memory 1203.
[0235] It should be noted that the specific processing process of the communication interface 1201 and the processor 1202 is detailed in the method embodiment and will not be repeated here.
[0236] Of course, in actual application, the various components in the SIM card 1200 are coupled together through the bus system 1204. It is understandable that the bus system 1204 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.12 Various buses are labeled as bus system 1204.
[0237] The memory 1203 in the embodiment of the present application is used to store various types of data to support the operation of the SIM card 1200. Examples of such data include: any computer program used to operate on the SIM card 1200.
[0238] The method disclosed in the above embodiment of the present application can be applied to the processor 1202, or implemented by the processor 1202. The processor 1202 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1202 or an instruction in the form of software. The above-mentioned processor 1202 may be a general-purpose processor, a digital signal processor (DSP, DigitalSignal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1202 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 1203, and the processor 1202 reads the information in the memory 1203 and completes the steps of the above method in combination with its hardware.
[0239] In an exemplary embodiment, the SIM card 1200 may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.
[0240] It can be understood that the memory (memory 1203) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory, a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0241] In order to implement the key management method of the embodiment of the present application, the embodiment of the present application also provides a key management system. Fig.13 The structure diagram of the key management system of the present application embodiment is as follows: Fig.13 As shown, the system includes: a digital identity application 1300, a first card application 1301 and a key module 1302; wherein,
[0242] The first card application 1301 is used to receive a first request sent by the digital identity application 1300; and send the first request to the key module 1302;
[0243] The key module 1302 is used to obtain the root identifier of the SIM card in response to the first request; parse the first request to obtain the discrete factor of the target level; and generate the subkey of the target level based on the root identifier and the discrete factor of the target level;
[0244] The key module 1302 is further used to send the key generation result of the subkey of the target level to the first card application 1301;
[0245] The first card application 1301 is further configured to receive a key generation result sent by the key module 1302 , and send the key generation result to the digital identity application 1300 .
[0246] Here, the first request is used to request the generation of a subkey of a target level, and the first request includes a discrete factor of the target level. The key generation result includes one or more of the following: a key identifier of the subkey of the target level; key path information of the subkey of the target level; and a sub-public key in the subkey of the target level.
[0247] It should be noted that the specific processing process of the digital identity application 1300, the first card application 1301 and the key module 1302 to complete the key management has been described in detail above and will not be repeated here.
[0248] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 1203 storing a computer program, and the above-mentioned computer program can be executed by a processor 1202 in a SIM card 1200 to complete the steps of the key management method on the key module side of the aforementioned SIM card, or to complete the steps of the key management method on the first card application side of the aforementioned SIM card. Among them, the computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0249] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the processor 1202 in the SIM card 1200 to complete the steps of the key management method on the key module side in the aforementioned SIM card, or to complete the steps of the key management method on the first card application side in the aforementioned SIM card.
[0250] It should be noted that: "first", "second", "third", etc. are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0251] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0252] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A key management method, It is characterized in that Applied to a user identification module SIM card, the SIM card includes a first card application and a key module, and the method includes: In response to a first request sent by the digital identity application through the first card application, the key module obtains the root identifier of the SIM card; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level; Parsing the first request to obtain a discrete factor of the target level; A subkey of the target level is generated based on the root identifier and a discrete factor of the target level.
2. The method according to claim 1, It is characterized in that The subkey of the target level represents the subkey of the first level; The generating the subkey of the target level based on the root identifier and the discrete factor of the target level includes: Based on the root identifier, generate a master key; the master key includes a master private key; Based on the master private key and the discrete factor of the first level, the subkey of the first level is generated; the discrete factor of the first level includes one or more of the following: additional information of the master key; an application scenario identifier of the first level; and first offset information.
3. The method according to claim 2, It is characterized in that The master key also includes a master public key corresponding to the master private key; the method also includes: The master public key is generated based on the master private key using an elliptic curve algorithm.
4. The method according to claim 1, It is characterized in that The subkey of the target level represents a subkey of a second level or a level greater than the second level; The generating the subkey of the target level based on the root identifier and the discrete factor of the target level includes: Based on the root identifier, generate a master key; the master key includes a master private key; Generate a first-level subkey based on the master private key and the first-level discrete factor; the first-level discrete factor includes one or more of the following: additional information of the master key, an application scenario identifier of the first level, and first offset information; Generate a subkey of the target level based on the subprivate key in the subkey of the i-th level and the discrete factor of the target level; Among them, i is a positive integer greater than or equal to 1, and the target level is an adjacent level greater than the i-th level; the discrete factor of the target level includes one or more of the following: additional information of the subkey of the i-th level; application scenario identifier of the target level; second offset information.
5. The method according to claim 4, It is characterized in that The i-th level subkey also includes a subpublic key corresponding to the subprivate key in the i-th level subkey, and the master key also includes a master public key corresponding to the master private key; Among them, the sub-public key of the first level is generated by the digital identity application based on the master public key and the discrete factor of the first level; when i is a positive integer greater than 1, the sub-public key of the i-th level is generated by the digital identity application based on the sub-public key of the i-1th level and the discrete factor of the i-th level.
6. The method according to claim 4, It is characterized in that The i-th level subkey includes the i-th level subprivate key and the i-th level subpublic key; The i-th level sub-public key is generated by the key module using an elliptic curve algorithm based on the i-th level sub-private key and returned to the digital identity application.
7. The method according to claim 1, It is characterized in that The SIM card further includes a card holder identity authentication module; the step of obtaining the root identifier of the SIM card includes: If the authentication result indicates that the identity of the holder of the SIM card is verified, obtaining the root identifier of the SIM card; The authentication result is obtained by the first card application calling the card holder identity authentication module so that the card holder identity authentication module authenticates the identity of the SIM card holder based on the personal identity identification code of the SIM card.
8. The method according to claim 1, It is characterized in that After generating the subkey of the target level based on the root identifier and the discrete factor of the target level, the method further includes: In response to a second request sent by the digital identity application through the first card application, the key module determines a target subkey; the second request is used to request to use the target subkey, and the second request includes data to be used; The target subkey is used to perform a calculation operation on the data to be used to obtain a corresponding calculation result.
9. The method according to claim 8, It is characterized in that The second request also includes a key identifier of the target subkey; and determining the target subkey includes: Parsing the second request to obtain a key identifier of the target subkey; Based on the key identifier of the target subkey and the mapping table, the target subkey is searched from the subkeys of each target level.
10. The method according to claim 9, It is characterized in that Before searching the target subkey from the subkeys of each target level based on the key identifier and the mapping table of the target subkey, the method further includes: Generate a key identifier of the subkey of the target level based on the subpublic key corresponding to the subprivate key in the subkey of the target level; A mapping table between the key identifiers of the subkeys of each target level and the sub-private keys in the subkeys of each target level is established and stored.
11. The method according to claim 8, It is characterized in that The second request also includes key path detailed information; and the determining the target subkey includes: Parsing the second request to obtain detailed information of the key path; the detailed information of the key path includes an application scenario identifier of a corresponding level; A corresponding target subkey is determined based on the key path detailed information.
12. The method according to claim 8, It is characterized in that The using the target subkey to perform a calculation operation on the data to be used to obtain a corresponding calculation result includes one of the following: In the case where the data to be used includes data to be signed, using the target subkey to perform a signing operation on the data to be signed to obtain corresponding signature data; In the case where the data to be used includes data to be decrypted, the data to be decrypted is decrypted using the target subkey to obtain corresponding plaintext data.
13. The method according to claim 1, It is characterized in that After generating the subkey of the target level based on the root identifier and the discrete factor of the target level, the method further includes: sending a key generation result for the subkey of the target level to the first card application, so that the first card application sends the key generation result to the digital identity application; The key generation result includes one or more of the following: the key identifier of the subkey of the target level; the key path information of the subkey of the target level; and the sub-public key of the subkey of the target level.
14. A key management method, It is characterized in that Applied to a user identification module SIM card, the SIM card includes a first card application and a key module, and the method includes: The first card application receives a first request sent by the digital identity application; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level; Sending the first request to the key module, so that the key module responds to the first request, obtains the root identifier of the SIM card, parses the first request, and obtains the discrete factor of the target level; based on the root identifier and the discrete factor of the target level, generates a subkey of the target level; A key generation result for the subkey of the target level sent by the key module is received, and the key generation result is sent to the digital identity application.
15. The method according to claim 14, It is characterized in that The SIM card further includes a card holder identity authentication module; before sending the first request to the key module, the method further includes: Calling the card holder identity authentication module so that the card holder identity authentication module authenticates the identity of the SIM card holder based on the personal identification code of the SIM card to obtain an authentication result; Receive the authentication result sent by the card holder identity authentication module.
16. The method according to claim 15, It is characterized in that The sending the first request to the key module comprises: In the case that the authentication result indicates that the identity of the holder of the SIM card is verified, the first request is sent to the key module.
17. The method according to claim 14, It is characterized in that The SIM card further includes a storage module; after receiving the key generation result for the subkey of the target level sent by the key module, the method further includes: Calling the storage module so that the storage module stores the key generation result; the key generation result includes one or more of the following: a key identifier of the subkey of the target level; key path information of the subkey of the target level; a sub-public key in the subkey of the target level; Receive a storage response result sent by the storage module.
18. A key management device, It is characterized in that Applied to a user identification module SIM card, the SIM card includes a first card application and a key module, and the device includes: an acquisition unit, configured to acquire a root identifier of the SIM card in response to a first request sent by the digital identity application through the first card application; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level; A parsing unit, configured to parse the first request to obtain a discrete factor of the target level; The first generating unit is used to generate a subkey of the target level based on the root identifier and the discrete factor of the target level.
19. A key management device, It is characterized in that Applied to a user identification module SIM card, the SIM card includes a first card application and a key module, and the device includes: A first receiving unit, configured to receive a first request sent by a digital identity application; the first request is used to request generation of a subkey of a target level, and the first request includes a discrete factor of the target level; A first sending unit, configured to send the first request to the key module, so that the key module responds to the first request, obtains the root identifier of the SIM card, parses the first request, and obtains the discrete factor of the target level; and generates a subkey of the target level based on the root identifier and the discrete factor of the target level; A second receiving unit, configured to receive a key generation result for the subkey of the target level sent by the key module; The second sending unit is used to send the key generation result to the digital identity application.
20. A subscriber identity module SIM card, It is characterized in that include: a processor and a memory for storing a computer program capable of running on said processor; Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 13, or executes the steps of the method described in any one of claims 14 to 17.
21. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 13, or implements the steps of the method according to any one of claims 14 to 17.
22. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 13, or implements the steps of the method according to any one of claims 14 to 17.
