A proxy re-encryption method based on SM9 collaborative algorithm

By storing private keys in shards and performing collaborative calculations on the user terminal and collaboration server, the SM9 collaborative algorithm agent re-encryption method solves the problem of low private key security in traditional technology, improves data security and difficulty, and is suitable for Scenarios such as mobile Internet and Internet of Things.

CN118018187BActive Publication Date: 2024-09-03SHANGMI (GUANGZHOU) INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410037488.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2024-09-03
Estimated Expiration
2044-01-10

AI Technical Summary

Technical Problem

In traditional identity-based proxy re-encryption technology, users holding complete private keys are easily attacked or cracked, especially in scenarios such as the mobile Internet and the Internet of Things, resulting in low security of private keys and affecting the security of network services.

Method used

The proxy re-encryption method based on the SM9 collaborative algorithm is used to fragment the private key and store part of it in the user terminal and collaboration server respectively. The proxy re-encryption key is generated through collaborative calculation to avoid the private key being obtained when a single terminal is attacked.

Benefits of technology

It improves the security and difficulty of private keys and protects the security of user data without affecting the efficiency of data sharing and access. It is suitable for application scenarios of terminals without hardware encryption locks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118018187B
    Figure CN118018187B
Patent Text Reader

Abstract

The present invention discloses a proxy re-encryption method based on the SM9 collaborative algorithm, including: a key generation center generates a master public-private key pair for encryption, and publicly discloses the master public key for encryption; the key generation center generates respective private key fragments for the data sender, the data receiver and the collaborative server; the data sender uses its own identification to initially encrypt the file and sends the ciphertext to the cloud; the data sender and the collaborative server collaboratively generate a proxy re-encryption key according to the data receiver's identification and send it to the cloud; the cloud re-encrypts the ciphertext to generate a re-encrypted ciphertext that can be decrypted by the data receiver's private key, and transmits it to the data receiver; the data receiver and the collaborative server collaboratively decrypt to obtain plaintext; the above-mentioned collaborative operation part involving the private keys of both parties can also be operated with a complete private key. Based on the SM9 collaborative algorithm, the present invention proposes a proxy re-encryption method that not only ensures the secure sharing of cloud data, but also improves the security of private keys.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data proxy re-encryption technology in the field of cryptography, and in particular to a proxy re-encryption method based on an SM9 collaborative algorithm. Background Art

[0002] With the development of cloud computing, data storage and processing are increasingly dependent on the cloud, and users need to share and access data securely in the cloud. For example, users may need to distribute encrypted files to other users. There are two problems with the traditional file distribution model: first, the user's data may be leaked or tampered with by the cloud, and second, users need to perform frequent decryption and encryption operations, which increases computing overhead and time delay. To solve these problems, proxy re-encryption technology provides an effective solution, which allows the cloud to convert one user's ciphertext into another user's ciphertext without knowing the data content and key, thereby achieving secure data forwarding and access control.

[0003] Identity-based public key cryptography is a cryptography system that uses the user's identity (such as email, mobile phone number, etc.) as the public key. It can avoid the complex certificate management mechanism required by certificate-based public key cryptography. Identity-based proxy re-encryption technology combines identity-based encryption technology with proxy re-encryption technology. It allows users to encrypt data with their own identity, and then use other users' identities to generate a proxy re-encryption key, which is authorized to the cloud, so that the cloud can convert the ciphertext encrypted by one user's identity into the ciphertext encrypted by another user's identity, thereby realizing data security sharing and access control in cloud storage-based file distribution applications.

[0004] However, in traditional identity-based proxy re-encryption technology, users usually hold the complete private key, which is easy to be attacked or cracked on terminals without hardware encryption locks, especially in application scenarios such as mobile Internet and Internet of Things, where users' terminal devices often have low security protection capabilities and are more susceptible to malware or hackers. Therefore, in terms of the security of private keys, only users holding the complete private key affects the security of network services to a certain extent. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention aims to provide a proxy re-encryption method based on the SM9 collaborative algorithm, which fragments the private key while maintaining the characteristics of the proxy re-encryption, thereby solving the problem of low security of the private key in the prior art. The specific technical solution is as follows:

[0006] A proxy re-encryption method based on the SM9 collaborative algorithm, characterized by: including a data sender A, a data receiver B, a collaborative server, a key generation center KGC and a cloud, specifically including the following steps:

[0007] S1: The key generation center KGC generates the encrypted master private key and encrypted master public key , and publicly encrypt the master public key

[0008] S2: The key generation center KGC generates user-side private key shards and collaboration-side private key shards for the data sender A, the data receiver B and the collaboration server. and Or generate complete private keys for data sender A and data sender B and , and disclose the user ID and ;

[0009] S3: Data sender A receives data from data sender A based on its ID and encrypted master public key Generate initial ciphertext of data , and send it to cloud storage;

[0010] S4: If the data sender A holds the private key fragment, execute step S5 and jump to step S7; if the data sender A holds the complete private key, jump directly to step S6;

[0011] S5: Data sender A shards data based on the user's private key , the public key of the data requester B Shard with the collaboration server based on the collaboration server's private key Perform collaborative operations to generate proxy re-encryption keys With elliptic curve points And send it to the cloud;

[0012] S6: Data sender A uses the complete private key , ID of data recipient B and encrypted master public key Generate proxy re-encryption keys With elliptic curve points And send it to the cloud;

[0013] S7: The cloud uses the initial ciphertext Re-encrypting keys with a proxy Perform re-encryption operation to generate re-encrypted ciphertext , and send the re-encrypted ciphertext With elliptic curve points To data recipient B;

[0014] S8: If the data recipient B holds the private key fragment, execute step S9; if the data recipient B holds the complete private key, jump directly to step S10;

[0015] S9: Data receiver B re-encrypts the ciphertext , user-side private key sharding and elliptic curve points Shard with the collaboration server based on the collaboration server's private key Perform collaborative decryption operations to generate data plaintext;

[0016] S10: Data receiver B re-encrypts the ciphertext , full private key and elliptic curve points Perform decryption operations to generate data plaintext.

[0017] Furthermore, the data sender A, the data receiver B, the key generation center KGC, the collaborative server and the cloud share the elliptic curve parameters of the SM9 algorithm , where the elliptic curve For a finite field The elliptic curve on for Additive cyclic group of order The generator of for Additive cyclic group of order The generator of is the prime order of the cyclic group, For arrive Factorial cyclic group The bilinear pairing of A byte representing the encryption private key generation function identifier.

[0018] Furthermore, the S1 stage includes the following steps:

[0019] S11. The key generation center KGC generates a The random number between , will be used as the encryption master private key ;

[0020] S12. The key generation center KGC generates and publishes the encryption master public key .

[0021] Furthermore, the S2 stage includes the following steps:

[0022] S21. The key generation center KGC generates a key in a finite domain according to the identifier of the data sender A (or the data receiver B). Calculation (or ), then calculate (or );

[0023] S22. Determine the type of private key that the data sender A (or data receiver B) will hold. If the data sender A (or data receiver B) will hold a complete private key, jump to step S25; if the data sender A (or data receiver B) will hold a fragmented private key, execute steps S23 to S24;

[0024] S23. The key generation center KGC generates a The random number between the two is used as the private key shard of the collaboration end of the data sender A (or data receiver B). (or ), shard the collaboration end private key (or ) is sent to the collaboration server;

[0025] S24. The key generation center KGC calculates the private key shards of the data sender A (or data receiver B) (or ) and shard the client private key (or ) is sent to the data sender A (or data receiver B);

[0026] S25. The key generation center KGC will complete the private key (or ) is sent to data sender A (or data receiver B).

[0027] Further: The S3 stage includes the following steps:

[0028] S31. Data sender A computing group Elements in ;

[0029] S32. Data sender A generates a random number ;

[0030] S33. Data sender A computing group Elements in ;

[0031] S34. Bilinear pairing of data sender A ;

[0032] S35. Data sender A calculates bilinear pairing ;

[0033] S36. Data sender A performs calculations based on the encryption method of plain text:

[0034] S361. If the method for encrypting the plaintext is a sequence cipher algorithm based on a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if is an all-0 bit string, then return to S32; calculate ;

[0035] S362. If the method for encrypting the plaintext is a block cipher algorithm combined with a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if is an all-0 bit string, then return to S32; calculate ;

[0036] S37. Data sender A calculates ;

[0037] S38. Data sender A outputs ciphertext And send it to cloud storage.

[0038] Further: The S5 stage includes the following steps:

[0039] S51. Data sender A receives data from data requester B based on his / her ID ,Computing Group Elements in , calculate the bilinear pairing ;

[0040] S52. Data sender A selects a random number , and calculate the elliptic curve point , calculate the bilinear pairing ;

[0041] S53. Data sender A receives data from data requester B based on his / her ID , generate partial proxy re-encryption keys , and perform the following calculations:

[0042]

[0043]

[0044] S54. Data sender A sends part of the proxy re-encryption key , the identity of the data requester B ,group Elements in And bilinear pairings Request collaborative generation of proxy re-encryption keys from the collaboration server;

[0045] S55. Collaborative server selects random number , and calculate the elliptic curve point ;

[0046] S56. The collaborative server re-encrypts the key based on the partial proxy , the identity of the data requester B ,group Elements in , bilinear pairing And the collaborative end private key sharding Generate full proxy re-encryption key , perform the following calculations:

[0047]

[0048]

[0049]

[0050] S57. The collaboration server returns the complete proxy re-encryption key , elliptic curve point To data sender A;

[0051] S58. Data sender A sends the complete proxy re-encryption key , elliptic curve point To the cloud.

[0052] Furthermore, the S6 stage includes the following steps:

[0053] S61. Data sender A identifies the data requester B according to his / her identity and encrypted master public key ,Computing Group Elements in , calculate the bilinear pairing ;

[0054] S62. Data sender A selects a random number , and calculate the elliptic curve point , calculate the bilinear pairing ;

[0055] S63. Data sender A generates a proxy re-encryption key , and perform the following calculations:

[0056]

[0057] S64. Data sender A sends the proxy re-encryption key , elliptic curve point To the cloud.

[0058] Further: The S7 stage includes the following steps:

[0059] S71. The cloud starts from the initial ciphertext Get ;

[0060] S72. The cloud re-encrypts the key based on the proxy ,calculate ;

[0061] S73. Send re-encrypted ciphertext to the cloud With elliptic curve points To data requester B.

[0062] Furthermore, the S9 stage includes the following steps:

[0063] S91. Data receiver B selects a random number , and shard according to the user's private key and elliptic curve points Compute bilinear pairings , send data to the recipient B and bilinear pairings To the collaboration server;

[0064] S92. The collaborative server shards according to the server private key Compute bilinear pairings , send bilinear pairings To data recipient B;

[0065] S93. Data receiver B calculates bilinear pairing ;

[0066] S94. Data requester B re-encrypts the ciphertext , data requester identifier and elliptic curve points Generate bilinear pairings , and perform the following calculations:

[0067]

[0068] S95. The data requesting party B performs calculations based on the sequence cipher algorithm based on the key derivation function or the block cipher algorithm combined with the key derivation function selected during the original encryption;

[0069] S951. If the method for encrypting the plaintext is a sequence cipher algorithm based on a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0070] S952. If the method for encrypting the plaintext is a block cipher algorithm combined with a key derivation function, calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0071] S96. Data requester B re-encrypts the ciphertext calculate ;

[0072] S97. Data requester B determines the Is it equal to , if so, As the data plain text.

[0073] Furthermore, the S10 stage includes the following steps:

[0074] S101. Data receiver B uses elliptic curve point With the full private key Compute bilinear pairings ;

[0075] S102. Data requester B re-encrypts the ciphertext , data requester B's identifier and elliptic curve points Generate bilinear pairings , and perform the following calculations:

[0076]

[0077] S103. The data requester B performs calculations based on the sequence cipher algorithm based on the key derivation function or the block cipher algorithm combined with the key derivation function selected during the original encryption;

[0078] S1031. If the method for encrypting the plaintext is a sequence cipher algorithm based on a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0079] S1032. If the method for encrypting the plaintext is a block cipher algorithm combined with a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0080] S104. Data requester B re-encrypts the ciphertext calculate ;

[0081] S105. Data requester B determines the Is it equal to , if so, As the data plain text.

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

[0083] 1. The present invention adopts the proxy re-encryption technology based on the SM9 collaborative algorithm, which can use the user's identity (such as email, mobile phone number, etc.) as the public key, avoiding the complex certificate management mechanism required by the certificate-based public key cryptography system, and simplifying the user's key generation and management process;

[0084] 2. The present invention provides two types of keys, which are respectively suitable for application scenarios of terminals with hardware encryption locks and terminals without hardware encryption locks, meeting different needs of users. In application scenarios with terminals with hardware encryption locks, users hold a complete private key and can directly perform decryption and authorization operations. In application scenarios without hardware encryption lock terminals and terminal devices with low security protection capabilities, users hold a part of the private key, called a key shard, which requires collaborative computing with the collaborative server to complete decryption and authorization operations, which can avoid intrusion by malware or hackers, and is particularly suitable for application scenarios such as mobile Internet and the Internet of Things;

[0085] 3. The present invention realizes secure distributed storage of private keys by dividing the private key into two parts, one part is stored on the user's terminal and the other part is stored in the collaborative server. In this way, even if the user's terminal or the collaborative server is attacked or cracked, the user's complete private key cannot be obtained, thereby protecting the user's data security. This technology can effectively improve the security and difficulty of private keys without affecting the sharing and access efficiency of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 It is a flowchart of the proxy re-encryption method based on the SM9 collaborative algorithm of the present invention; DETAILED DESCRIPTION

[0087] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.

[0088] The present invention proposes a proxy re-encryption scheme based on the SM9 collaborative algorithm, which is described in detail below.

[0089] Symbols and Definitions

[0090]

[0091] The elliptic curve parameters involved in the present invention are set according to the national secret SM9 algorithm standard, and the user's identity (such as email address, mobile phone number, etc.) can be used as the public key, avoiding the complex certificate management mechanism required by the certificate-based public key cryptography system and simplifying the user's key generation and management process. For a finite field The elliptic curve on for Additive cyclic group of order The generator of for Additive cyclic group of order The generator of is the prime order of the cyclic group, For arrive Factorial cyclic group The bilinear pairing of A byte representing the encryption private key generation function identifier.

[0092] like Figure 1 As shown, the proxy re-encryption method based on the SM9 collaborative algorithm includes the following steps:

[0093] S1: The key generation center KGC generates the encrypted master private key and encrypted master public key , and publicly encrypt the master public key ;

[0094] Specifically, step S1 includes:

[0095] S11. The key generation center KGC generates a The random number between , will be used as the encryption master private key ;

[0096] S12. The key generation center KGC generates and publishes the encryption master public key .

[0097] S2: The key generation center KGC generates user-side private key shards and collaboration-side private key shards for the data sender A, the data receiver B and the collaboration server. and and disclose the user ID and ; In the application scenario of the terminal without hardware encryption lock, the private key can be divided into two parts;

[0098] Or the key generation center KGC generates a complete private key for data sender A and data sender B and , and disclose the user ID and ; In the application scenario of a terminal with a hardware encryption lock, directly generate a complete private key for the user;

[0099] As an optional implementation scheme of the present invention, two types of keys can be provided, which are respectively suitable for application scenarios of terminals with hardware encryption locks and terminals without hardware encryption locks, thereby meeting different needs of users.

[0100] Specifically, step S2 includes:

[0101] S21. The key generation center KGC generates a key in a finite domain according to the identifier of the data sender A (or the data receiver B). Calculation (or ), then calculate (or );

[0102] S22. Determine the type of private key held by the data sender A (or the data receiver B). If the private key is to be fragmented, execute steps S23 to S24;

[0103] S23. The key generation center KGC generates a The random number between the two is used as the private key shard of the collaboration end of the data sender A (or data receiver B). (or ), shard the collaboration end private key (or ) is sent to the collaboration server and stored;

[0104] S24. The key generation center KGC calculates the private key shards of the data sender A (or data receiver B) (or ) and shard the client private key (or ) is sent to the data sender A (or data receiver B) and stored;

[0105] In this technical solution, part of the private key is stored on the user's terminal, and the other part is stored in the collaborative server, realizing secure distributed storage of the private key. In this way, even if the user's terminal or collaborative server is attacked or cracked, the user's complete private key cannot be obtained, thereby protecting the user's data security. This technology can effectively improve the security and difficulty of private keys without affecting the sharing and access efficiency of data;

[0106] Specifically, step S2 also includes:

[0107] S22. Determine the type of private key that the data sender A (or data receiver B) will hold. If the data sender A (or data receiver B) will hold a complete private key, jump to step S25;

[0108] S25. The key generation center KGC will complete the private key (or ) is sent to data sender A (or data receiver B).

[0109] As an optional implementation scheme of the present invention, in an application scenario with a hardware encryption lock terminal, the user holds a complete private key and can directly perform decryption and authorization operations; in an application scenario without a hardware encryption lock terminal or with a terminal device with low security protection capabilities, the user holds a part of the private key, called a key shard, which requires collaborative computing with a collaborative server to complete decryption and authorization operations, which can avoid intrusion by malware or hackers and is particularly suitable for application scenarios such as mobile Internet and the Internet of Things.

[0110] S3: Data sender A receives data from data sender A based on its ID and encrypted master public key Generate initial ciphertext of data , and sent to cloud storage; specifically, step S3 includes:

[0111] S31. Data sender A computing group Elements in ;

[0112] S32. Data sender A generates a random number ;

[0113] S33. Data sender A computing group Elements in ;

[0114] S34. Bilinear pairing of data sender A ;

[0115] S35. Data sender A calculates bilinear pairing ;

[0116] S36. Data sender A performs calculations based on the encryption method of plain text:

[0117] S361 If the method for encrypting the plaintext is a sequence cipher algorithm based on a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if is an all-0 bit string, then return to S32; calculate ;

[0118] S362 If the method for encrypting the plaintext is a block cipher algorithm combined with a key derivation function, calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if is an all-0 bit string, then return to S32; calculate ;

[0119] S37. Data sender A calculates ;

[0120] S38. Data sender A outputs ciphertext And send it to cloud storage.

[0121] S4: If the data sender A holds the private key fragment, execute step S5 and jump to step S7; if the data sender A holds the complete private key, jump directly to step S6;

[0122] S5: Data sender A shards data based on the user's private key , the public key of the data requester B Shard with the collaboration server based on the collaboration server's private key Perform collaborative operations to generate proxy re-encryption keys With elliptic curve points And send it to the cloud;

[0123] Specifically, step S5 includes:

[0124] S51. Data sender A receives data from data requester B based on his / her ID ,Computing Group Elements in , calculate the bilinear pairing ;

[0125] S52. Data sender A selects a random number , and calculate the elliptic curve point , calculate the bilinear pairing ;

[0126] S53. Data sender A receives data from data requester B based on his / her ID , generate partial proxy re-encryption keys , and perform the following calculations:

[0127]

[0128] S54. Data sender A sends part of the proxy re-encryption key , the identity of the data requester B ,group Elements in And bilinear pairings Request collaborative generation of proxy re-encryption keys from the collaboration server;

[0129] S55. Collaborative server selects random number , and calculate the elliptic curve point ;

[0130] S56. The collaborative server re-encrypts the key based on the partial proxy , the identity of the data requester B ,group Elements in , bilinear pairing And the collaborative end private key sharding Generate full proxy re-encryption key , perform the following calculations:

[0131]

[0132] S57. The collaboration server returns the complete proxy re-encryption key , elliptic curve point To data sender A;

[0133] S58. Data sender A sends the complete proxy re-encryption key , elliptic curve point To the cloud.

[0134] S6: Data sender A uses the complete private key , ID of data recipient B and encrypted master public key Generate proxy re-encryption keys With elliptic curve points And send it to the cloud;

[0135] Specifically, step S6 includes:

[0136] S61. Data sender A identifies the data requester B according to his / her identity and encrypted master public key Computing Group Elements in , calculate the bilinear pairing ;

[0137] S62. Data sender A selects a random number , and calculate the elliptic curve point Compute bilinear pairings ;

[0138] S63. Data sender A generates a proxy re-encryption key , and perform the following calculations:

[0139]

[0140] S64. Data sender A sends the proxy re-encryption key , elliptic curve point To the cloud.

[0141] S7: The cloud uses the initial ciphertext Re-encrypting keys with a proxy Perform re-encryption operation to generate re-encrypted ciphertext , and send the re-encrypted ciphertext With elliptic curve points To data recipient B;

[0142] Specifically, step S7 includes:

[0143] S71. The cloud starts from the initial ciphertext Get ;

[0144] S72. The cloud re-encrypts the key based on the proxy ,calculate ;

[0145] S73. Send re-encrypted ciphertext to the cloud With elliptic curve points To data requester B.

[0146] S8: If the data recipient B holds the private key fragment, execute step S9; if the data recipient B holds the complete private key, jump directly to step S10;

[0147] S9: Data receiver B re-encrypts the ciphertext , user-side private key sharding and elliptic curve points Shard with the collaboration server based on the collaboration server's private key Perform collaborative decryption operations to generate data plaintext;

[0148] Specifically, step S9 includes:

[0149] S91. Data receiver B selects a random number , and shard according to the user's private key and elliptic curve points Compute bilinear pairings , send data to the recipient B and bilinear pairings To the collaboration server;

[0150] S92. The collaborative server shards according to the server private key Compute bilinear pairings , send bilinear pairings To data recipient B;

[0151] S93. Data receiver B calculates bilinear pairing ;

[0152] S94. Data requester B re-encrypts the ciphertext , data requester identifier and elliptic curve points Generate bilinear pairings , and perform the following calculations:

[0153]

[0154] S95. The data requesting party B performs calculations based on the sequence cipher algorithm based on the key derivation function or the block cipher algorithm combined with the key derivation function selected during the original encryption;

[0155] S951. If the method for encrypting the plaintext is a sequence cipher algorithm based on a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0156] S952. If the method for encrypting the plaintext is a block cipher algorithm combined with a key derivation function, calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0157] S96. Data requester B re-encrypts the ciphertext calculate ;

[0158] S97. Data requester B determines the Is it equal to , if so, As the data plain text.

[0159] S10: Data receiver B re-encrypts the ciphertext , full private key and elliptic curve points Perform decryption operations to generate data plaintext.

[0160] Specifically, step S10 includes:

[0161] S101. Data receiver B uses elliptic curve point With the full private key Compute bilinear pairings ;

[0162] S102. Data requester B re-encrypts the ciphertext , data requester B's identifier and elliptic curve points Generate bilinear pairings , and perform the following calculations:

[0163]

[0164] S103. The data requester B performs calculations based on the sequence cipher algorithm based on the key derivation function or the block cipher algorithm combined with the key derivation function selected during the original encryption;

[0165] S1031. If the method for encrypting the plaintext is a sequence cipher algorithm based on a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0166] S1032. If the method for encrypting the plaintext is a block cipher algorithm combined with a key derivation function, then calculate the integer , then calculate .make for The leftmost Bit, For the rest Bit, if If it is a string of all 0 bits, an error is reported and the program exits. ;

[0167] S104. Data requester B re-encrypts the ciphertext calculate ;

[0168] S105. Data requester B determines the Is it equal to , if so, As the data plain text.

[0169] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A proxy re-encryption method based on the SM9 collaborative algorithm, characterized in that: Including data sender A, data receiver B, key generation center KGC, cloud and collaborative server, specifically including the following steps: S1: The key generation center KGC generates the encrypted master private key and encrypted master public key , and publicly encrypt the master public key ; S2: The key generation center KGC generates user-side private key shards and collaboration-side private key shards for the data sender A, the data receiver B and the collaboration server. and Or generate complete private keys for data sender A and data sender B and , and disclose the user ID and ; S3: Data sender A receives data from data sender A based on its ID and encrypted master public key Generate initial ciphertext of data , and send it to cloud storage; S4: If the data sender A holds the private key fragment, execute step S5 and jump to step S7; if the data sender A holds the complete private key, jump directly to step S6; S5: Data sender A shards data based on the user's private key , the public key of the data requester B Shard with the collaboration server based on the collaboration server's private key Perform collaborative operations to generate proxy re-encryption keys With elliptic curve points And send it to the cloud; S6: Data sender A uses the complete private key , ID of data recipient B and encrypted master public key Generate proxy re-encryption keys With elliptic curve points And send it to the cloud; S7: The cloud uses the initial ciphertext Re-encrypting keys with a proxy Perform re-encryption operation to generate re-encrypted ciphertext , and send the re-encrypted ciphertext With elliptic curve points To data recipient B; S8: If the data recipient B holds the private key fragment, execute step S9; if the data recipient B holds the complete private key, jump directly to step S10; S9: Data receiver B re-encrypts the ciphertext , user-side private key sharding and elliptic curve points Shard with the collaboration server based on the collaboration server's private key Perform collaborative decryption operations to generate data plaintext; S10: Data receiver B re-encrypts the ciphertext , full private key and elliptic curve points Perform decryption operations to generate data plaintext.

2. The proxy re-encryption method based on the SM9 collaborative algorithm as claimed in claim 1, characterized in that: The data sender A, the data receiver B, the key generation center KGC, the cloud and the collaborative server share the elliptic curve parameters of the SM9 algorithm , where the elliptic curve For a finite field The elliptic curve on for Additive cyclic group of order The generator of for Additive cyclic group of order The generator of is the prime order of the cyclic group, For arrive Factorial cyclic group The bilinear pairing of A byte representing the encryption private key generation function identifier.

3. The proxy re-encryption method based on the SM9 collaborative algorithm as claimed in claim 1, characterized in that: Data sender A uses the user's private key to shard Sharding of the collaborative client private key with the collaborative server Collaborative generation of proxy re-encryption keys includes: Data sender A identifies the data receiver and encrypted master public key Computing Group Elements in With bilinear pairing ; Data sender A generates a random number , and calculate the elliptic curve point , calculate the bilinear pairing ; Data sender A identifies Calculating the hash value , calculate the partial proxy re-encryption key , sending the partial proxy re-encryption key , logo ,group Elements in and bilinear pairings To the collaboration server; Collaboration server generates random numbers , and calculate the elliptic curve point , calculate the bilinear pairing ; The collaboration server uses the identifier Calculating the hash value , sharding based on the collaboration end private key Compute proxy re-encryption key , sending the proxy re-encryption key and elliptic curve points To data sender A; Data sender A sends the proxy re-encryption key and elliptic curve points To the cloud.

4. The proxy re-encryption method based on the SM9 collaborative algorithm as claimed in claim 1, characterized in that: Data sender A uses the complete private key Generating a proxy re-encryption key involves: Data sender A identifies the data receiver and encrypted master public key Computing Group Elements in With bilinear pairing ; Data sender A generates a random number , and calculate the elliptic curve point , calculate the bilinear pairing ; Data sender A identifies the data receiver B Calculating the hash value , calculate the proxy re-encryption key ; Data sender A sends the data to the proxy for re-encryption and elliptic curve points To the cloud.

5. The proxy re-encryption method based on the SM9 collaborative algorithm according to claim 1 is characterized in that: The cloud uses the initial ciphertext Re-encrypting keys with a proxy Methods for performing re-encryption operations include: Cloud from ciphertext Get ; The cloud re-encrypts the key based on the proxy Calculate partially re-encrypted ciphertext ; Generate re-encrypted ciphertext in the cloud , and re-encrypt the ciphertext With elliptic curve points Send to data recipient B.

6. The proxy re-encryption method based on the SM9 collaborative algorithm according to claim 1 is characterized in that: Data receiver B uses the user's private key to shard Sharding of the collaborative client private key with the collaborative server Collaborative decryption includes: Data receiver B generates a random number , calculate the bilinear pairing ; Data receiver B sends data sender B's ID and bilinear pairings Request the collaborative server to perform collaborative decryption; The collaboration server shards according to the collaboration client private key Compute bilinear pairings , sending the bilinear pairing To data recipient B; Data receiver B uses bilinear pairing Compute bilinear pairings ; Data sender B identifies the data sender B Calculating the hash value ; Data receiver B uses the hash value and re-encrypted ciphertext Compute bilinear pairings ; Data receiver B calculates the final plaintext message based on the sequence cipher algorithm based on the key derivation function or the block cipher algorithm combined with the key derivation function selected during the original encryption. , and determine whether the decryption is successful.

7. The proxy re-encryption method based on the SM9 collaborative algorithm according to claim 1 is characterized in that: Data receiver B uses the complete private key Decrypting and re-encrypting ciphertext includes: Data receiver B uses the elliptic curve point , full private key Compute bilinear pairings ; Data recipient B uses the data recipient ID Calculating the hash value ; Data receiver B uses the hash value and re-encrypted ciphertext Compute bilinear pairings ; Data receiver B calculates the final plaintext message based on the sequence cipher algorithm based on the key derivation function or the block cipher algorithm combined with the key derivation function selected during the original encryption. , and determine whether the decryption is successful.

Citation Information

Patent Citations

  • Proxy re-encryption method and system with specified condition keyword search function

    CN112000985A

  • SM2-based certificateless collaborative signature method

    CN115766028A

  • Conditional proxy re-encryption method based on SM9

    CN116722977A

  • One-way proxy re-encryption method and apparatus, and electronic device and system

    WO2022120699A1