Identify combined key signature and encryption method

By introducing identification combination key signature and encryption methods in public key cryptography technology, the user's public and private key pairs are derived using the mathematical characteristics of elliptic curve cryptography, the inefficiency problem of relying on third-party CA systems in the prior art is solved, and the inefficiency problem of relying on third-party CA systems is realized. Efficient and secure user identity authentication and key management in a cloud computing environment.

CN119051876BActive Publication Date: 2025-02-14SICHUAN DIGITAL CERTIFICATE AUTHENTICATION MANAGEMENT CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411450294.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-14
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The existing public key cryptography technology relies on third-party CA systems for identity authentication, which is time-consuming and inefficient, making it difficult to meet the lightweight and diversified needs of cloud computing for terminal types.

Method used

Through the steps of initializing the system key, applying for distribution of user identification keys, signing, verifying, encrypting and decrypting messages using identification keys, using the mathematical characteristics of the elliptic curve password, based on the master key, secondary key and user The characteristic value derives the user's public and private key pairs, forming a secure trust self-certification system.

Benefits of technology

The user identity and public key authenticity can be proved without the participation of third-party CA agencies, which improves the security and efficiency of keys and is suitable for lightweight client applications such as mobile mini programs, H5, and APP.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119051876B_ABST
    Figure CN119051876B_ABST
Patent Text Reader

Abstract

The present invention discloses an identification combination key signature and encryption method, which relates to the field of information security technology, including: system key initialization; user identification key application distribution; using the identification key to sign the user's message; using the identification key to verify the user's signature; using the identification key to encrypt the user's message; using the identification key to decrypt the user's message; the present invention solves the problems of user identity and public key authenticity and key security under the public key system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, in particular to an identification combined key signature and encryption method. Background Art

[0002] The current application areas of public key cryptography technology mainly rely on PKI / CA authentication and digital signature technology. The PKI authentication system is composed of terminal user entities, certificate registration authorities RA, and certificate issuing authorities CA. The terminal user key is generated by a hardware cryptographic module similar to USBKEY. RA reviews the user's identity information. CA associates and binds the user's public key with the user's identity information by issuing a user certificate to prove who the network identity corresponding to the user's public key is.

[0003] The PKI authentication system is a trust domain established by each terminal entity based on the common trust in the same CA organization. When entities need to perform identity authentication, they need to verify the signature of the counterparty's digital certificate and the validity of the certificate chain. Identity authentication needs to rely on a third-party CA system, which is time-consuming and inefficient. At the same time, it is difficult to integrate hardware devices such as USBKEY for the currently widely used lightweight client applications such as mobile applets, H5, and APP. The traditional hardware key solution based on the PC environment can hardly meet the lightweight and diversified terminal types required by cloud computing. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide an identification combination key signature and encryption method, which solves the problems of user identity and public key authenticity and key security under the public key system.

[0005] To achieve the above object, the technical solution adopted by the present invention is: a method for signing and encrypting an identification combination key, comprising the following steps:

[0006] Step 1: System key initialization: The key generation system initializes the master key, including the master private key and the master public key. The identity authentication system generates the secondary key, including the secondary private key and the secondary public key. The identity authentication system applies to the key generation system for the system identification key, including the system identification private key and the system identification public key.

[0007] Step 2: User identification key application and distribution: Generate three-level keys for the user, including three-level private keys and three-level public keys, and apply to the key generation system for user identification keys, including user identification private keys and user identification public keys;

[0008] Step 3: Sign the user's message using the identification key: Calculate the user's key factor and the user's combined private key, and use the user's combined private key to sign the message;

[0009] Step 4: Use the identification key to verify the user's signature: query the user's identification key and calculate the user's combined public key, and use the user's combined public key to verify the signature;

[0010] Step 5: Encrypt the user's message using the identification key: query the user's identification key and calculate the user's combined public key, and use the user's combined public key to encrypt the message to be sent;

[0011] Step 6: Decrypt the user's message using the identification key: Calculate the user's key factor and the user's combined private key, and use the user's combined private key to decrypt the message.

[0012] As a further improvement of the present invention, in step 1, the master key and the secondary key are specifically as follows:

[0013] The key generation system calls the server cryptographic machine to generate the SM2 key pair as the system's master key. The master private key is denoted as ms, and the master public key is denoted as PUB. PUB = [ms]G, where G is the base point of the elliptic curve, and the x and y coordinate bit strings of PUB are denoted as xPUB and yPUB respectively. PUB is open for external query.

[0014] The identity authentication system calls the server cryptographic machine to generate the SM2 key pair as the system's secondary key. The secondary private key is recorded as SysBuiPri and the secondary public key is recorded as SysBuiPub. SysBuiPub =[SysBuPri]G.

[0015] As a further improvement of the present invention, in step 1, the identity authentication system applies for a system identification key from the key generation system specifically including:

[0016] The identity authentication system obtains its own SysId, and sends SysId||SysBuiPub to the key generation system to apply for the system identification key, where || represents concatenation; the key generation system generates a random number SysRan∈[1,n-1] for the identity authentication system, where n is the order of the base point G; the key generation system calculates and generates the system identification public key SysIdPub= [SysRan]G + SysBuiPub of the identity authentication system, and the x and y coordinate bit strings of SysIdPub are represented as xSysIdPub and ySysIdPub respectively;

[0017] The key generation system uses the SM3 algorithm to calculate and generate the system identification factor SysIdFactor=SM3(SysId||xSysIdPub||ySysIdPub||xPUB||yPUB) mod n of the identity authentication system; wherein mod is a modulus operation; the key generation system calculates and generates the system identification private key SysIdPri=(SysIdFactor*SysRan+ms) modn of the identity authentication system; wherein * is a large integer multiplication operation;

[0018] The key generation system sends the system identification private key and system identification public key, namely SysIdPri||SysIdPub, to the identity authentication system. The identity authentication system uses the SM3 algorithm to calculate and generate the system identification factor SysIdFactor= SM3(SysId||xSysIdPub||ySysIdPub||xPUB||yPUB) mod n; and calculates the system combination private key SysComPri=(SysIdPri+SysIdFactor*SysBuiPri) mod n, and calculates the system combination public key SysComPub=[SysIdFactor]SysIdPub+PUB;

[0019] The identity authentication system verifies the correctness of the system combination public key and confirms whether SysComPub is equal to [SysComPri]G; if they are equal, it means that the key is correct, and the identity authentication system stores the system combination private key SysComPri in the server cipher machine for secret storage, and provides the system identification public key SysIdPub for public query; if they are not equal, the system identification key is re-applied for.

[0020] As a further improvement of the present invention, the step 2 is specifically as follows:

[0021] The user logs in to the identity authentication system, and the identity authentication system obtains the user's dedicated terminal device identifier, recorded as UsrIdDev; the user enters the identity information UsrId and the authentication password UsrPIN, and the identity authentication system uses SM3 and HMAC algorithm to calculate and generate the user key factor UsrKeyFactor=HMAC(UsrIdDev||UsrId,SM3(UsrPIN)) mod n;

[0022] The identity authentication system generates a random number 1 for the user, denoted as UsrRan1∈[1,n-1]; the identity authentication system calculates the user's third-level private key UsrBuiPri=(UsrKeyFactor+UsrRan1+SysComPri ) mod n, calculate the user's third-level public key UsrBuiPub=[UsrBuiPri]G;

[0023] The identity authentication system sends UsrId||UsrBuiPub to the key generation system to apply for a user identification key for the user; the key generation system generates a random number 2 for the user, denoted as UsrRan2∈[1,n-1], and calculates and generates a user identification public key UsrIdPub=[UsrRan2]G+UsrBuiPub, and the x and y coordinate bit strings of UsrIdPub are represented as xUsrIdPub and yUsrIdPub respectively; at the same time, the SM3 algorithm is used to calculate and generate a user identification factor UsrIdFactor=SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n, and calculates a user identification private key UsrIdPri=(UsrIdFactor*UsrRan2+ms) mod n, and send the user identification private key and user identification public key, namely UsrIdPri||UsrIdPub, to the identity authentication system;

[0024] The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n; and calculates the user combined private key fragment 1, recorded as UsrComPri1=(UsrIdPri+UsrIdFactor*UsrRan1) mod n, calculates the user combined private key UsrComPri=(UsrIdPri+UsrIdFactor*UsrBuiPri) mod n, and calculates the user combined public key UsrComPub=[UsrIdFactor]UsrIdPub+PUB;

[0025] The identity authentication system verifies the correctness of the user's combined public key and confirms whether UsrComPub is equal to [UsrComPri]G; if they are equal, it means that the key is correct. The identity authentication system encrypts UsrComPri1 using the server cipher machine and stores it in ciphertext. The user identification public key UsrIdPub is stored in plaintext and is available for public query; if they are not equal, a new user identification key is applied for.

[0026] As a further improvement of the present invention, the step 3 is specifically as follows:

[0027] The user key factor UsrKeyFactor is calculated and generated. The identity authentication system searches for the user identification public key UsrIdPub and the user combined private key fragment 1, namely UsrComPri1, according to the user identity information UsrId. The identity authentication system calculates the user identification factor UsrIdFactor and the user combined private key fragment 2, recorded as UsrComPri2, UsrComPri2=(UsrIdFactor*(UsrKeyFactor+SysComPri))mod n, calculates the user combined private key UsrComPri=(UsrComPri1+UsrComPri2) mod n, and calculates the user combined public key UsrComPub=[UsrComPri]G; the identity authentication system calls the user combined private key UsrComPri and adopts the national encryption SM3 and SM2 algorithms to sign the message.

[0028] As a further improvement of the present invention, the step 4 is specifically as follows:

[0029] The identity authentication system searches for the user identification public key UsrIdPub based on the user identity information UsrId. The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n and calculates the user combination public key UsrComPub = [UsrIdFactor]UsrIdPub+PUB. The identity authentication system calls the user combination public key UsrComPub The national secret SM3 and SM2 algorithms are used to verify the user's signed message.

[0030] As a further improvement of the present invention, the step 5 is specifically as follows:

[0031] The identity authentication system searches for the user identification public key UsrIdPub according to the user identity information UsrId. The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n, and calculates the user combination public key UsrComPub = [UsrIdFactor]UsrIdPub+PUB; the identity authentication system calls the user combination public key UsrComPub and adopts the national secret SM4 and SM2 algorithms to encrypt the message to be sent.

[0032] As a further improvement of the present invention, the step 6 is specifically as follows:

[0033] The user key factor UsrKeyFactor is calculated and generated. The identity authentication system searches for the user identification public key UsrIdPub and the user combined private key fragment 1, namely UsrComPri1, according to the user identity information UsrId. The identity authentication system calculates the user identification factor UsrIdFactor and calculates the user combined private key fragment 2, namely UsrComPri2. UsrComPri2 = (UsrIdFactor*(UsrKeyFactor+SysComPri)) mod n, calculate the user's combined private key UsrComPri=(UsrComPri1+UsrComPri2) mod n; the identity authentication system calls the user's combined private key UsrComPri and uses the national secret SM4 and SM2 algorithms to decrypt the ciphertext message.

[0034] The present invention utilizes the mathematical properties of elliptic curve cryptography to derive a user's public and private key pair based on a master key, a secondary key and a user characteristic value, thereby forming a secure trust self-certification system and solving the problem of public key authentication and authenticity proof under a public key system.

[0035] The present invention uses three factors, namely, user terminal identification, identity identification and user password, as user key factors, and combines them with the server system key to derive the user's public and private key pair, thereby solving the problem of self-certification of the association and binding between the user terminal, user key, user identification and the server system. The unique binding relationship can be proved without the participation of a third-party CA organization in the authentication.

[0036] The beneficial effects of the present invention are:

[0037] 1. The user key of the present invention is generated in segments, stored in pieces, and calculated in combination. Only through multiple key factors private to the user, the fragment keys stored in the server, and the hardware key of the server cryptographic machine can the user's combined private key be calculated in combination. Compared with the traditional cloud computing that directly uses the server key signature, this solution has a small exposure of the user's private key, and there is no risk of the server being dragged, the user terminal being cloned, and the user identity being counterfeited across terminals, and it has high security.

[0038] 2. The user key of the present invention does not rely on the client password module, and the key authentication does not rely on the third-party CA system. It can be widely adapted to the digital signature and encryption and decryption application scenarios of lightweight clients such as mobile applets, H5, APP, etc., and meet the lightweight and diversified needs of cloud computing for terminal types. Signature verification is time-saving and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a system structure block diagram of an embodiment of the present invention;

[0040] Figure 24 is a system flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0042] Example:

[0043] This embodiment proposes an identification combination key signing and encryption method, which uses the terminal identification, user identity identification and user password as factors for calculating the user key pair. When the key is generated, each party generates key fragments and stores them in segments. When the key is used, the user public and private key pairs are generated by combining the user identification, user fragment keys and system key parameters. In this way, the association and binding between the user identity, terminal identity and identity authentication system and trusted authentication are realized, and the problems of user identity and public key authenticity and key security under the public key system are solved.

[0044] like Figure 1 As shown, specifically, the system of this embodiment is composed of a terminal device, an identity authentication system, a key generation system and a server cryptographic machine; the system flow is as follows Figure 2 As shown, the specific steps include:

[0045] S100: System key initialization.

[0046] S101: The key generation system initializes the master key.

[0047] S10101: The key generation system calls the server cryptographic machine to generate the SM2 key pair as the master key. The master private key is denoted as ms, and the master public key is denoted as PUB. PUB = [ms]G ​​(G is the base point of the elliptic curve, the same below). The x and y coordinate bit strings of PUB are represented as xPUB and yPUB respectively. PUB provides public query to the outside world.

[0048] S102: The identity authentication system generates a secondary key.

[0049] S10201: The identity authentication system calls the server cryptographic machine to generate the SM2 key pair as the system secondary key. The secondary private key is recorded as SysBuiPri and the secondary public key is recorded as SysBuiPub. SysBuiPub = [SysBuPri]G.

[0050] S103: The identity authentication system applies to the key generation system for a system identification key.

[0051] S10301: The identity authentication system obtains its own SysId and passes the SysId || SysBuiPub is sent to the key generation system to apply for the system identification key.

[0052] S10302: The key generation system generates a random number SysRan∈[1,n-1] (n is the order of the base point G, the same below) for the identity authentication system.

[0053] S10303: The key generation system calculates and generates the system identification public key SysIdPub = [SysRan]G + SysBuiPub of the identity authentication system, and the x and y coordinate bit strings of SysIdPub are represented as xSysIdPub and ySysIdPub respectively.

[0054] S10304: The key generation system uses the SM3 algorithm to calculate and generate the system identification factor SysIdFactor = SM3(SysId||xSysIdPub||ySysIdPub||xPUB||yPUB) mod n of the identity authentication system, where mod is a modulus (remainder) operation.

[0055] S10305: The key generation system calculates and generates the system identification private key SysIdPri=(SysIdFactor*SysRan+ms) mod n of the identity authentication system, where * is a large integer multiplication operation.

[0056] S10306: The key generation system sends the system identification private key and the system identification public key, namely SysIdPri||SysIdPub, to the identity authentication system.

[0057] S10307: The identity authentication system uses the SM3 algorithm to calculate and generate the system identification factor SysIdFactor = SM3(SysId||xSysIdPub||ySysIdPub||xPUB||yPUB) mod n.

[0058] S10308: The identity authentication system calculates the system combined private key SysComPri = (SysIdPri + SysIdFactor * SysBuiPri) mod n.

[0059] S10309: The identity authentication system calculates the system combined public key SysComPub=[SysIdFactor]SysIdPub+PUB.

[0060] S10310: The identity authentication system verifies the correctness of the system combined public key and confirms whether SysComPub is equal to [SysComPri]G?

[0061] S10311: If they are equal, it means the key is correct. The identity authentication system stores the system combination private key SysComPri in the server cipher machine for secret storage, and provides the system identification public key SysIdPub for public query.

[0062] S10312: If they are not equal, return to S10301 and apply for the system identification key again.

[0063] S200: Apply for distribution of user identification key.

[0064] S201: Generate a third-level key for a user, taking user A as an example.

[0065] S20101: User A logs in to the identity authentication system, and the identity authentication system obtains the dedicated terminal device identifier of user A, recorded as UsrIdDev.

[0066] S20102: The user enters identity information UsrId and authentication password UsrPIN.

[0067] S20103: The identity authentication system uses SM3 and HMAC algorithm to calculate and generate the user key factor UsrKeyFactor = HMAC(UsrIdDev||UsrId,SM3(UsrPIN)) mod n.

[0068] S20104: The identity authentication system generates a random number 1 for user A, denoted as UsrRan1∈[1,n-1].

[0069] S20105: The identity authentication system calculates the third-level private key for user A: UsrBuiPri = (UsrKeyFactor + UsrRan1 + SysComPri ) mod n.

[0070] S20106: The identity authentication system calculates the user's third-level public key UsrBuiPub= [UsrBuiPri]G for user A.

[0071] S202: Apply for a user identification key from a key generation system.

[0072] S20201: Identity authentication system will UsrId ||UsrBuiPub is sent to the key generation system to apply for a user identification key for user A.

[0073] S20202: The key generation system generates a random number 2 for user A, denoted as UsrRan2∈[1,n-1].

[0074] S20203: The key generation system calculates and generates the user identification public key UsrIdPub=[UsrRan2]G+UsrBuiPub of user A. The x and y coordinate bit strings of UsrIdPub are represented as xUsrIdPub and yUsrIdPub respectively.

[0075] S20204: The key generation system uses the SM3 algorithm to calculate and generate the user identification factor UsrIdFactor=SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n of user A.

[0076] S20205: The key generation system calculates user A's user identification private key UsrIdPri=(UsrIdFactor*UsrRan2+ms) mod n.

[0077] S20206: The key generation system sends user A's identification private key and user identification public key, namely UsrIdPri||UsrIdPub, to the identity authentication system.

[0078] S20207: The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n of user A.

[0079] S20208: The identity authentication system calculates the user combined private key fragment 1 of user A, recorded as UsrComPri1=(UsrIdPri+UsrIdFactor*UsrRan1) mod n.

[0080] S20209: The identity authentication system calculates user A’s user combination private key UsrComPri=(UsrIdPri+UsrIdFactor*UsrBuiPri) mod n.

[0081] S20210: The identity authentication system calculates the user combined public key of user A, UsrComPub=[UsrIdFactor]UsrIdPub+PUB.

[0082] S20211: The identity authentication system verifies the correctness of the user's combined public key and confirms whether UsrComPub is equal to [UsrComPri]G?

[0083] S20212: If they are equal, it means the key is correct. The identity authentication system will encrypt UsrComPri1 using the server cipher machine and store it in ciphertext. The user identification public key UsrIdPub will be stored in plain text. The user identification public key UsrIdPub will be available for public query.

[0084] S20213: If they are not equal, return to S20201 and reapply for the user identification key.

[0085] S300: Sign using the identification key.

[0086] Take user A signing a message as an example.

[0087] S301: Calculate user key factor.

[0088] S30101: Same as S20101.

[0089] S30102: Same as S20102.

[0090] S30103: Same as S20103.

[0091] S302: Calculate the user's combined private key.

[0092] S30201: The identity authentication system searches for the user identification public key UsrIdPub and the user combined private key fragment 1 (ie, UsrComPri1) based on the user identity information UsrId.

[0093] S30202: Same as S20207.

[0094] S30203: The identity authentication system calculates the user's combined private key fragment 2 (denoted as UsrComPri2), UsrComPri2=(UsrIdFactor*(UsrKeyFactor+SysComPri))mod n.

[0095] S30204: The identity authentication system calculates the user's combined private key UsrComPri=(UsrComPri1+UsrComPri2)mod n.

[0096] S303: Sign using the user's combined private key.

[0097] S30301: The identity authentication system calculates the user's combined public key UsrComPub=[UsrComPri]G.

[0098] S30302: The identity authentication system calls the user's combined private key UsrComPri and uses the national encryption SM3 and SM2 algorithms to sign the message.

[0099] S400: Use the identification key to verify the signature.

[0100] Take verifying user A's signature as an example.

[0101] S401: Query the user identification key and calculate the user combined public key.

[0102] S40101: The identity authentication system searches for user A's user identification public key UsrIdPub based on the user identity information UsrId.

[0103] S40102: Same as S20207.

[0104] S40103: Same as S20210.

[0105] S402: Use the user's combined public key to verify the signature.

[0106] S40201: The identity authentication system calls the user combination public key UsrComPub of user A The national secret SM3 and SM2 algorithms are used to verify the signature of user A.

[0107] S500: Encrypt using the identification key.

[0108] Take sending an encrypted message to user A as an example.

[0109] S501: Query the user identification key and calculate the user combined public key, same as S401.

[0110] S502: Use the user's combined public key to encrypt the message to be sent.

[0111] S50201: The identity authentication system calls the user combination public key UsrComPub of user A The national secret SM4 and SM2 algorithms are used to encrypt messages to be sent.

[0112] S600: Decrypt using the identification key.

[0113] Take user A decrypting a message as an example.

[0114] S601: Calculate user key factor, same as S301.

[0115] S602: Calculate the user's combined private key, same as S302.

[0116] S603: Decrypt the message using the user's combined private key.

[0117] S60301: The identity authentication system calls user A’s user combination private key UsrComPri and uses the national secret SM4 and SM2 algorithms to decrypt the ciphertext message.

[0118] The above-mentioned embodiments only express the specific implementation of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A method for signing and encrypting a combination key, characterized in that: The following steps are involved: Step 1: System key initialization: The key generation system initializes the master key, including the master private key and the master public key. The identity authentication system generates the secondary key, including the secondary private key and the secondary public key. The identity authentication system applies to the key generation system for the system identification key, including the system identification private key and the system identification public key. In step 1, the master key and the secondary key are as follows: The key generation system calls the server cryptographic machine to generate the SM2 key pair as the system's master key. The master private key is denoted as ms, and the master public key is denoted as PUB. PUB = [ms]G, where G is the base point of the elliptic curve, and the x and y coordinate bit strings of PUB are denoted as xPUB and yPUB respectively. PUB is open for external query. The identity authentication system calls the server cryptographic machine to generate the SM2 key pair as the secondary key of the system. The secondary private key is recorded as SysBuiPri and the secondary public key is recorded as SysBuiPub. SysBuiPub=[SysBuiPri]G; In step 1, the identity authentication system applies to the key generation system for the system identification key, specifically including: The identity authentication system obtains its own SysId, and sends SysId||SysBuiPub to the key generation system to apply for the system identification key, where || represents concatenation; the key generation system generates a random number SysRan∈[1,n-1] for the identity authentication system, where n is the order of the base point G; the key generation system calculates and generates the system identification public key SysIdPub =[SysRan]G + SysBuiPub of the identity authentication system, and the x and y coordinate bit strings of SysIdPub are represented as xSysIdPub and ySysIdPub respectively; The key generation system uses the SM3 algorithm to calculate and generate the system identification factor SysIdFactor of the identity authentication system = SM3(SysId||xSysIdPub||ySysIdPub||xPUB||yPUB) mod n; where mod is a modulus operation, and the key generation system calculates and generates the system identification private key SysIdPri = (SysIdFactor*SysRan+ms) mod n of the identity authentication system, where * is a large integer multiplication operation; The key generation system sends the system identification private key and system identification public key, namely SysIdPri||SysIdPub, to the identity authentication system. The identity authentication system uses the SM3 algorithm to calculate and generate the system identification factor SysIdFactor= SM3(SysId||xSysIdPub||ySysIdPub||xPUB||yPUB) mod n; and calculates the system combination private key SysComPri=(SysIdPri+SysIdFactor*SysBuiPri) mod n, and calculates the system combination public key SysComPub=[SysIdFactor]SysIdPub+PUB; The identity authentication system verifies the correctness of the system combination public key and confirms whether SysComPub is equal to [SysComPri]G; if they are equal, it means that the key is correct, and the identity authentication system stores the system combination private key SysComPri in the server cipher machine for secret storage, and provides the system identification public key SysIdPub for public query; if they are not equal, the system identification key is re-applied; Step 2: User identification key application and distribution: Generate three-level keys for the user, including three-level private keys and three-level public keys, and apply to the key generation system for user identification keys, including user identification private keys and user identification public keys; The step 2 is specifically as follows: The user logs in to the identity authentication system, and the identity authentication system obtains the user's dedicated terminal device identifier, recorded as UsrIdDev; the user enters the identity information UsrId and the authentication password UsrPIN, and the identity authentication system uses SM3 and HMAC algorithm to calculate and generate the user key factor UsrKeyFactor=HMAC(UsrIdDev||UsrId,SM3(UsrPIN)) mod n; The identity authentication system generates a random number 1 for the user, denoted as UsrRan1∈[1,n-1]; the identity authentication system calculates the user's third-level private key UsrBuiPri=(UsrKeyFactor+UsrRan1+SysComPri) mod n, and calculates the user's third-level public key UsrBuiPub=[UsrBuiPri]G; The identity authentication system sends UsrId||UsrBuiPub to the key generation system to apply for a user identification key for the user; the key generation system generates a random number 2 for the user, denoted as UsrRan2∈[1,n-1], and calculates and generates a user identification public key UsrIdPub=[UsrRan2]G+UsrBuiPub, and the x and y coordinate bit strings of UsrIdPub are represented as xUsrIdPub and yUsrIdPub respectively; at the same time, the SM3 algorithm is used to calculate and generate a user identification factor UsrIdFactor=SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n, and calculates a user identification private key UsrIdPri=(UsrIdFactor*UsrRan2+ms) mod n, and send the user identification private key and user identification public key, namely UsrIdPri||UsrIdPub, to the identity authentication system; The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n; and calculates the user combined private key fragment 1, recorded as UsrComPri1=(UsrIdPri+UsrIdFactor*UsrRan1) mod n, calculates the user combined private key UsrComPri=(UsrIdPri+UsrIdFactor*UsrBuiPri) mod n, and calculates the user combined public key UsrComPub=[UsrIdFactor]UsrIdPub+PUB; The identity authentication system verifies the correctness of the user's combined public key and confirms whether UsrComPub is equal to [UsrComPri]G; if they are equal, it means that the key is correct. The identity authentication system encrypts UsrComPri1 using the server cipher machine and stores it in ciphertext, and stores the user identification public key UsrIdPub in plaintext. The user identification public key UsrIdPub is available for public query; if they are not equal, a new user identification key is applied for; Step 3: Sign the user's message using the identification key: Calculate the user's key factor and the user's combined private key, and use the user's combined private key to sign the message; The step 3 is as follows: Calculate and generate the user key factor UsrKeyFactor. The identity authentication system searches for the user identification public key UsrIdPub and the user combined private key fragment 1, namely UsrComPri1, according to the user identity information UsrId. The identity authentication system calculates the user identification factor UsrIdFactor, calculates the user combined private key fragment 2, recorded as UsrComPri2, UsrComPri2=(UsrIdFactor*(UsrKeyFactor+SysComPri))mod n, calculates the user combined private key UsrComPri=(UsrComPri1+UsrComPri2) mod n, and calculates the user combined public key UsrComPub=[UsrComPri]G; the identity authentication system calls the user combined private key UsrComPri and uses the national secret SM3 and SM2 algorithms to sign the message; Step 4: Use the identification key to verify the user's signature: query the user's identification key and calculate the user's combined public key, and use the user's combined public key to verify the signature; The step 4 is specifically as follows: The identity authentication system searches for the user identification public key UsrIdPub based on the user identity information UsrId. The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n, and calculates the user combination public key UsrComPub = [UsrIdFactor]UsrIdPub+PUB; the identity authentication system calls the user combination public key UsrComPub and uses the national secret SM3 and SM2 algorithms to verify the user's signature message; Step 5: Encrypt the user's message using the identification key: query the user's identification key and calculate the user's combined public key, and use the user's combined public key to encrypt the message to be sent; The step 5 is specifically as follows: The identity authentication system searches for the user identification public key UsrIdPub according to the user identity information UsrId. The identity authentication system uses the SM3 algorithm to calculate the user identification factor UsrIdFactor = SM3(UsrId||xUsrIdPub||yUsrIdPub||xPUB||yPUB) mod n, and calculates the user combination public key UsrComPub = [UsrIdFactor]UsrIdPub+PUB; the identity authentication system calls the user combination public key UsrComPub and adopts the national secret SM4 and SM2 algorithms to encrypt the message to be sent; Step 6: Decrypt the user's message using the identification key: Calculate the user's key factor and the user's combined private key, and use the user's combined private key to decrypt the message; The step 6 is specifically as follows: The user key factor UsrKeyFactor is calculated and generated. The identity authentication system searches for the user identification public key UsrIdPub and the user combined private key fragment 1, i.e., UsrComPri1, according to the user identity information UsrId. The identity authentication system calculates the user identification factor UsrIdFactor and the user combined private key fragment 2, i.e., UsrComPri2. UsrComPri2 = (UsrIdFactor*(UsrKeyFactor+SysComPri))mod n. The user combined private key UsrComPri=(UsrComPri1+UsrComPri2) mod n is calculated. The identity authentication system calls the user combined private key UsrComPri and adopts the national secret SM4 and SM2 algorithms to decrypt the ciphertext message.

Citation Information

Patent Citations

  • Identification private key generation and digital signature method, system and device

    CN111010272A

  • Identification key management and authentication method

    CN118368065A