Data Sharing Method, Device, Storage Medium and Equipment for Power System

By using encryption methods based on random numbers and multiplication cyclic group tuples in the power system, the efficient and secure sharing of power data in the cloud computing environment is solved, and the encryption speed is improved and data sharing is achieved.

CN120091026BActive Publication Date: 2025-07-18ZHONGSHAN POWER SUPPLY BUREAU OF GUANGDONG POWER GRID
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510570864.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-07-18
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

In the prior art, power data in power systems cannot be efficiently and securely shared, especially in the cloud computing environment, where encryption is time-consuming and common leakage risks are possible.

Method used

The encryption sequence is generated based on the first random number, prime factorial method, and the hash function are used to generate the encrypted sequence, encrypt the encrypted message, and the encrypted hash is calculated through the counter to generate a shared key, so as to realize the secure storage of data in the cloud server and the decryption of the target user.

Benefits of technology

It greatly improves encryption efficiency, reduces the time of traditional power calculation, realizes efficient and secure sharing of data, and reduces the risk of common leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120091026B_ABST
    Figure CN120091026B_ABST
Patent Text Reader

Abstract

The data sharing method, device, storage medium and equipment provided by this application for the power system can, when detecting that a data owner shares data with a target user, obtain the first random number selected by the target user and the pre-generated encryption sequence, and then obtain the message to be encrypted input by the data owner and the second random number. In this way, after calculating the encrypted hash according to the current count value of the counter, the first random number and the second random number, the message to be encrypted can be encrypted according to the hash function, the encrypted hash and the encryption sequence, and the encrypted ciphertext is sent to the cloud server for storage. Then, a shared key corresponding to the encrypted hash is generated, and the shared key can be sent to the target user, so that after the target user downloads the ciphertext from the cloud server, the ciphertext can be decrypted according to the shared key, thereby greatly improving the encryption efficiency and realizing efficient data sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of power data security, and in particular, to a data sharing method, device, storage medium, and equipment for a power system. Background Art

[0002] The power industry's dependence on data and the need for data security are increasing, especially in power grid management and maintenance. The widespread application of cloud computing provides sufficient storage and computing capabilities for the power system and has become an important part of the power information infrastructure. However, when power data is outsourced to a cloud server, secure sharing of the data becomes a basic requirement.

[0003] Currently, to achieve data security, most asymmetric encryption schemes are encrypted based on exponentiation operations, which may also include a large number of bilinear pairings. This is very time-consuming, and exponentiation is hundreds of times that of multiplication operations. Therefore, it cannot be well applied to actual development. Secondly, sharing data requires generating transformation keys, which also faces the risk of other data leakage caused by collusion between the CSP (Cloud Service Provider) and users. Summary of the Invention

[0004] The purpose of this application aims to solve at least one of the above technical defects, especially the technical defect that power data in the power system cannot be shared efficiently and securely in the prior art.

[0005] This application provides a data sharing method for a power system, and the method includes:

[0006] When it is detected that a data owner shares data with a target user, obtain the first random number selected by the target user and the corresponding encryption sequence, where the encryption sequence is generated based on the first random number, a multiplicative cyclic group tuple of prime order generated during the initialization of this system, and a hash function;

[0007] Obtain the message to be encrypted input by the data owner and a second random number, calculate an encrypted hash according to the current count value of the counter, the first random number, and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage;

[0008] Generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, decrypt the ciphertext according to the shared key.

[0009] Optionally, the method further includes:

[0010] When it is detected that the data owner clicks to revoke the data sharing with the target user, update the current count value of the counter, and after recalculating the encryption hash based on the updated count value, update the ciphertext stored in the cloud server according to the recalculated encryption hash.

[0011] Optionally, the method further includes:

[0012] When it is detected that the data owner decrypts the ciphertext, decrypt the ciphertext according to the encryption hash.

[0013] Optionally, the generation process of the encryption sequence includes:

[0014] Obtain a multiplicative cyclic group tuple of prime order and a hash function generated after the initialization of the system, and a first random number selected by the target user;

[0015] Determine a random vector according to the first random number and the hash function, and generate an encryption sequence according to the random vector, the prime order and the generator in the multiplicative cyclic group tuple.

[0016] Optionally, the encrypting the message to be encrypted according to the hash function, the encryption hash and the encryption sequence includes:

[0017] Determine a mapping vector according to the hash function and the encryption hash;

[0018] Encrypt the message to be encrypted according to the encryption sequence and the mapping vector.

[0019] Optionally, the generating a shared key corresponding to the encryption hash includes:

[0020] Obtain the generator in the multiplicative cyclic group tuple of prime order generated after the initialization of the system;

[0021] Determine a private key according to the first random number, and calculate a public key according to the generator and the first random number;

[0022] Generate a shared key according to the encryption hash, the public key and the private key.

[0023] The present application also provides a data sharing device for a power system, including:

[0024] A data acquisition module, configured to obtain a first random number selected by the target user and a corresponding encryption sequence when it is detected that a data owner shares data with the target user, where the encryption sequence is generated based on the first random number, a multiplicative cyclic group tuple of prime order generated during the initialization of the system, and a hash function;

[0025] A message encryption module, which is configured to obtain an encrypted message to be encrypted and a second random number input by the data owner, calculate an encrypted hash according to the current count value of the counter, the first random number and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage;

[0026] A data sharing module, which is configured to generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, the ciphertext can be decrypted according to the shared key.

[0027] Optionally, the device further includes:

[0028] A revocation sharing module, which is configured to update the current count value of the counter when it is detected that the data owner clicks to revoke the data sharing with the target user, recalculate the encrypted hash according to the updated count value, and encrypt the ciphertext stored in the cloud server according to the recalculated encrypted hash.

[0029] This application also provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the data sharing method for a power system as described in any one of the above embodiments.

[0030] This application also provides a computer device, including: one or more processors, and a memory;

[0031] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the data sharing method for a power system as described in any one of the above embodiments are executed.

[0032] It can be seen from the above technical solutions that the embodiments of this application have the following advantages:

[0033] The data sharing method, device, storage medium and equipment provided by this application for the power system can, when detecting that a data owner shares data with a target user, obtain the first random number selected by the target user and the corresponding encryption sequence. The encryption sequence is generated based on the first random number, the multiplicative cyclic group tuple of prime order generated during the initialization of this system, and a hash function. Then, obtain the message to be encrypted input by the data owner and the second random number. In this way, after calculating the encrypted hash according to the current count value of the counter, the first random number and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage. After that, generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, decrypt the ciphertext according to the shared key. This process converts the traditional power operation into a multiplication operation, and the encryption speed is dozens of times that of the conventional scheme, thus greatly improving the encryption efficiency. Moreover, this application only needs to share the encrypted hash between the data owner and the target user to achieve efficient data sharing, and can also achieve good performance even in the case of large amounts of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0035] Figure 1 It is a schematic flowchart of a data sharing method for the power system provided by an embodiment of this application;

[0036] Figure 2 It is a schematic flowchart of a method for revoking data sharing for the power system provided by an embodiment of this application;

[0037] Figure 3 It is a schematic structural diagram of a data sharing device for the power system provided by an embodiment of this application;

[0038] Figure 4 It is a schematic internal structure diagram of a computer device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0040] In one embodiment, as Figure 1 shown, Figure 1 is a schematic flowchart of a data sharing method for a power system provided by an embodiment of the present application; the present application provides a data sharing method for a power system, and the method may include:

[0041] S110: When it is detected that a data owner shares data with a target user, obtain the first random number selected by the target user and the corresponding encryption sequence.

[0042] In this step, when the power system detects that the data owner, that is, the grid client, shares data with the target user, the system can obtain the first random number selected by the target user and the corresponding encryption sequence. The encryption sequence is pre-generated by the system in combination with the first random number selected by the target user, the multiplicative cyclic group tuple of prime order generated during system initialization, and the hash function. Therefore, when it is detected that the data owner shares data with the target user, the pre-generated encryption sequence can be directly obtained, thereby saving data encryption time.

[0043] It can be understood that when the power system of the present application is initialized, it can generate a multiplicative cyclic group tuple of prime order , where is a multiplicative cyclic group of prime order , and is a generator of the group . Then, the power system can select hash functions , and , represents mapping any binary to -dimensional vector, and the value range is . In this way, after receiving the first random number selected by the target user, the corresponding encryption sequence can be generated.

[0044] S120: Obtain the message to be encrypted and the second random number input by the data owner, calculate the encrypted hash according to the current count value of the counter, the first random number, and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage.

[0045] In this step, after obtaining the first random number selected by the target user and the encryption sequence pre-generated by the system through S110, the present application can also obtain the message to be encrypted input by the data owner and the second random number. In this way, after calculating the encrypted hash based on the current count value of the counter, the first random number, and the second random number, the message to be encrypted can be encrypted according to the hash function, the encrypted hash, and the encryption sequence. The entire process uses multiplication operations, and the encryption speed is dozens of times that of the conventional solution, thus greatly improving the encryption efficiency. Moreover, after encrypting the information to be encrypted, the present application can also send the encrypted ciphertext to the cloud server for storage, so that both the target user and the data owner can download the ciphertext from the cloud server and decrypt it according to their needs at any time.

[0046] S130: Generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, the ciphertext can be decrypted according to the shared key.

[0047] In this step, after encrypting the information to be encrypted sent by the data owner through S120 and uploading it to the cloud server, the present application can also generate a shared key corresponding to the encrypted hash and send it to the target user. In this way, it can not only ensure the security of the encrypted hash, but also enable the target user to decrypt the ciphertext according to the encrypted hash in the shared key after downloading the ciphertext from the cloud server, so as to achieve data sharing.

[0048] For example, when the target user downloads the ciphertext from the cloud server, the encrypted hash can be obtained first through the following formula:

[0049]

[0050] In the formula, is the encrypted hash, and are the shared keys, is the first random number selected by the target user.

[0051] Then, the present application can also calculate the decrypted ciphertext through the following formula:

[0052]

[0053]

[0054] Among them, is the mapping vector, M is the decrypted ciphertext, is the ciphertext, .

[0055] In the above embodiments, when it is detected that the data owner shares data with the target user, the first random number selected by the target user and the corresponding encryption sequence can be obtained. The encryption sequence is generated based on the first random number, the multiplicative cyclic group tuple of prime order generated during the initialization of the system, and the hash function. Then, the message to be encrypted input by the data owner and the second random number are obtained. In this way, after calculating the encrypted hash according to the current count value of the counter, the first random number, and the second random number, the message to be encrypted can be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and the encrypted ciphertext is sent to the cloud server for storage. After that, a shared key corresponding to the encrypted hash is generated, and the shared key can be sent to the target user. After the target user downloads the ciphertext from the cloud server, the ciphertext can be decrypted according to the shared key. This process converts the traditional power operation into a multiplication operation, and the encryption speed is dozens of times that of the conventional scheme, thus greatly improving the encryption efficiency. Moreover, this application only needs to share the encrypted hash between the data owner and the target user to achieve efficient data sharing, and can also achieve good performance even in the case of a large amount of data.

[0056] In one embodiment, as Figure 2 shown, Figure 2 is a schematic flowchart of a method for revoking data sharing for a power system provided by an embodiment of this application; the method may further include:

[0057] S140: When it is detected that the data owner clicks to revoke the data sharing with the target user, update the current count value of the counter, and after recalculating the encrypted hash based on the updated count value, encrypt the ciphertext stored in the cloud server according to the recalculated encrypted hash.

[0058] In this embodiment, after this application encrypts the information to be encrypted according to the above encryption method, if the data owner wants to revoke the data sharing with the target user, the system only needs to update the current count value of the counter, recalculate the encrypted hash based on the updated count value, and then update the ciphertext stored in the cloud server according to the recalculated encrypted hash, without downloading the entire data set for local update, thereby reducing the broadband cost while achieving efficient update of the ciphertext.

[0059] In one embodiment, the method may further include:

[0060] S150: When it is detected that the data owner decrypts the ciphertext, decrypt the ciphertext according to the encrypted hash.

[0061] In this embodiment, the data owner can also download the ciphertext from the cloud server. When the system detects that the data owner downloads the ciphertext and decrypts it, the ciphertext can be decrypted according to the pre-stored encrypted hash.

[0062] For example, the data owner in this application inputs the ciphertext that needs to be decrypted , and then, through the following calculation formula, the ciphertext can be decrypted. The specific formula is as follows:

[0063]

[0064]

[0065] wherein, is the encryption hash, is the first random number, is the second random number, crt is the current count value of the counter, M is the decrypted ciphertext, and are the ciphertexts.

[0066] In one embodiment, the generation process of the encryption sequence may include:

[0067] S210: Obtain the multiplicative cyclic group tuple of prime order and the hash function generated after the initialization of the system, and the first random number selected by the target user.

[0068] S220: Determine the random vector according to the first random number and the hash function, and generate the encryption sequence based on the random vector, the prime order and the generator in the multiplicative cyclic group tuple.

[0069] In this embodiment, when generating the encryption sequence, this application may first obtain the multiplicative cyclic group tuple of prime order and the hash function generated after the initialization of the system, and the first random number selected by the target user, then determine the random vector according to the first random number and the hash function, and then generate the encryption sequence based on the random vector, the prime order and the generator in the multiplicative cyclic group tuple.

[0070] In a specific implementation manner, the first random number selected by the target user in this application is , let the private key , calculate the public key , the random vector is , and then the formula for calculating the encryption sequence is as follows:

[0071]

[0072] wherein, , . Obtain the encryption sequence .

[0073] In one embodiment, encrypting the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence in S120 may include:

[0074] S121: Determine a mapping vector according to the hash function and the encrypted hash.

[0075] S122: Encrypt the message to be encrypted according to the encryption sequence and the mapping vector.

[0076] In this embodiment, when encrypting the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence, a mapping vector may be determined first according to the hash function and the encrypted hash, and then the message to be encrypted may be encrypted according to the encryption sequence and the mapping vector.

[0077] For example, when the data owner inputs the message to be encrypted and the encryption sequence after that, a second random number is selected and the counter is initialized, and calculate:

[0078]

[0079]

[0080] where , the ciphertext is sent to the CSP for storage. Where and are ciphertexts obtained after encrypting the message to be encrypted, and of the present application can be linked to each other, so there is no need for repeated storage.

[0081] In one embodiment, generating a shared key corresponding to the encrypted hash in S130 may include:

[0082] S131: Obtain a generator in a multiplicative cyclic group tuple of prime order generated after the initialization of the system.

[0083] S132: Determine a private key according to the first random number, and calculate a public key according to the generator and the first random number.

[0084] S133: Generate a shared key according to the encrypted hash, the public key, and the private key.

[0085] In this embodiment, when generating a shared key corresponding to an encrypted hash, the generator in the multiplicative cyclic group tuple of prime order generated after the initialization of the system can be obtained first, and then the private key is determined according to the first random number, and the public key is calculated according to the generator and the first random number. Then, according to the encrypted hash, the public key, and the private key, the shared key is generated. Among them, the process of determining the private key according to the first random number and calculating the public key according to the generator and the first random number in this application can refer to the above calculation process, which will not be elaborated here. After obtaining the private key and the public key in this application, the process of generating the shared key is as follows:

[0086]

[0087] 。

[0088] Next, the data sharing device for the power system provided in the embodiment of this application will be described. The data sharing device for the power system described below can be correspondingly referred to the data sharing method for the power system described above.

[0089] In one embodiment, as Figure 3 shown, Figure 3 is a schematic structural diagram of a data sharing device for the power system provided in the embodiment of this application; this application also provides a data sharing device for the power system, which may include a data acquisition module 210, a message encryption module 220, and a data sharing module 230, specifically including the following:

[0090] The data acquisition module 210 is configured to obtain the first random number and the corresponding encryption sequence selected by the target user when it is detected that the data owner shares data with the target user, where the encryption sequence is generated based on the first random number, the multiplicative cyclic group tuple of prime order generated during the initialization of the system, and the hash function.

[0091] The message encryption module 220 is configured to obtain the message to be encrypted and the second random number input by the data owner, calculate the encrypted hash according to the current count value of the counter, the first random number, and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage.

[0092] The data sharing module 230 is configured to generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, the ciphertext is decrypted according to the shared key.

[0093] In the above embodiments, when it is detected that the data owner shares data with the target user, the first random number selected by the target user and the corresponding encryption sequence can be obtained. The encryption sequence is generated based on the first random number, the multiplicative cyclic group tuple of prime order generated during the initialization of the system, and the hash function. Then, the message to be encrypted input by the data owner and the second random number are obtained. In this way, after calculating the encrypted hash according to the current count value of the counter, the first random number, and the second random number, the message to be encrypted can be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and the encrypted ciphertext is sent to the cloud server for storage. After that, a shared key corresponding to the encrypted hash is generated, and the shared key can be sent to the target user. In this way, after the target user downloads the ciphertext from the cloud server, the ciphertext can be decrypted according to the shared key. This process converts the traditional power operation into a multiplication operation, and the encryption speed is dozens of times that of the conventional scheme, thus greatly improving the encryption efficiency. Moreover, this application only needs to share the encrypted hash between the data owner and the target user to achieve efficient data sharing, and can also achieve good performance even in the case of large amounts of data.

[0094] In one embodiment, the apparatus may further include:

[0095] The revocation sharing module is configured to, when it is detected that the data owner clicks to revoke the data sharing with the target user, update the current count value of the counter, and after recalculating the encrypted hash according to the updated count value, encrypt the ciphertext stored in the cloud server according to the recalculated encrypted hash.

[0096] In one embodiment, the present application also provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the data sharing method for a power system as described in any one of the above embodiments.

[0097] In one embodiment, the present application also provides a computer device, including: one or more processors, and a memory.

[0098] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the data sharing method for a power system as described in any one of the above embodiments are executed.

[0099] Schematically, as Figure 4 shown, Figure 4 is an internal structural diagram of a computer device provided by an embodiment of the present application. The computer device 300 can be provided as a server. Referring to Figure 4, the computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by a memory 301 for storing instructions executable by the processing component 302, such as application programs. The application programs stored in the memory 301 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the data sharing method for a power system according to any of the above embodiments.

[0100] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS XTM, Unix TM, Linux TM, Free BSDTM or the like.

[0101] Those skilled in the art can understand that Figure 4 the structure shown in

[0102] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0103] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0104] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data sharing method for a power system, characterized in that The method includes: When it is detected that the data owner shares data with the target user, obtain the first random number selected by the target user and the corresponding encryption sequence, where the encryption sequence is generated based on the first random number, the multiplicative cyclic group tuple of prime order generated during the initialization of this system, and a hash function; Obtain the message to be encrypted and the second random number input by the data owner, calculate the encrypted hash according to the current count value of the counter, the first random number, and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage; Generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, decrypt the ciphertext according to the shared key.

2. The data sharing method for a power system according to claim 1, wherein The method further includes: When it is detected that the data owner clicks to revoke the data sharing with the target user, update the current count value of the counter, recalculate the encrypted hash based on the updated count value, and encrypt the ciphertext stored in the cloud server according to the recalculated encrypted hash.

3. The data sharing method for a power system according to claim 1, wherein The method further includes: When it is detected that the data owner decrypts the ciphertext, decrypt the ciphertext according to the encrypted hash.

4. The data sharing method for a power system according to any one of claims 1-3, characterized in that, The generation process of the encryption sequence includes: Obtain the multiplicative cyclic group tuple of prime order and the hash function generated after the initialization of this system, and the first random number selected by the target user; Determine a random vector according to the first random number and the hash function, and generate an encryption sequence based on the random vector, the prime order, and the generator in the multiplicative cyclic group tuple.

5. The data sharing method for a power system according to any one of claims 1 to 3, characterized in that The encrypting the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence includes: Determine a mapping vector according to the hash function and the encrypted hash; Encrypt the message to be encrypted according to the encryption sequence and the mapping vector.

6. The data sharing method for a power system according to any one of claims 1-3, characterized in that The generating the shared key corresponding to the encrypted hash includes: Obtain the generator in the multiplicative cyclic group tuple of prime order generated after the initialization of this system; Determine a private key according to the first random number, and calculate a public key according to the generator and the first random number; Generate a shared key according to the encrypted hash, the public key, and the private key.

7. A data sharing device for a power system, characterized in that It includes: A data acquisition module, configured to, when it is detected that the data owner shares data with the target user, obtain the first random number selected by the target user and the corresponding encryption sequence, where the encryption sequence is generated based on the first random number, the multiplicative cyclic group tuple of prime order generated during the initialization of this system, and a hash function; A message encryption module, configured to obtain the message to be encrypted and the second random number input by the data owner, calculate the encrypted hash according to the current count value of the counter, the first random number, and the second random number, encrypt the message to be encrypted according to the hash function, the encrypted hash, and the encryption sequence, and send the encrypted ciphertext to the cloud server for storage; A data sharing module, configured to generate a shared key corresponding to the encrypted hash, and send the shared key to the target user, so that after the target user downloads the ciphertext from the cloud server, the target user decrypts the ciphertext according to the shared key.

8. The data sharing device for a power system according to claim 7, wherein The apparatus further includes: A revocation sharing module, configured to update the current count value of the counter when it is detected that the data owner clicks to revoke data sharing with the target user, recalculate the encrypted hash according to the updated count value, and encrypt the ciphertext stored in the cloud server according to the recalculated encrypted hash.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors are caused to execute the steps of the data sharing method for a power system according to any one of claims 1 to 6.

10. A computer device, characterized in that, Comprising: One or more processors, and a memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the data sharing method for a power system according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Multifunctional fine-grained access control method for cloud storage

    CN109246096A

  • Data communication method based on casual transmission protocol

    CN118764183A