Blockchain-assisted verification method for smart factory data sharing
By using blockchain-assisted verification, combined with attribute-based encryption and smart contracts, and leveraging the computing power of cloud computing servers, the security and efficiency issues of data sharing in smart factories have been resolved, achieving secure and efficient data sharing.
Patent Information
- Application Number
- CN202410010131.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-01-04
AI Technical Summary
In smart factories, existing technologies struggle to achieve secure and efficient data sharing while reducing computational overhead and verifying data integrity, especially given the limited storage and computing resources available on equipment.
By employing a blockchain-assisted verification method, using attribute-based encryption schemes and smart contracts, and leveraging the computing power of cloud computing servers, secure data encryption and decryption are achieved, reducing the computing burden on devices and ensuring data security through the decentralized nature of blockchain.
This approach achieves the goal of reducing computing and communication overhead while ensuring data security and integrity, preventing malicious data tampering by cloud computing servers, and improving the efficiency and security of data sharing.
Smart Images

Figure CN117749522B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, specifically to a smart factory data sharing method with blockchain-assisted verification. Background Technology
[0002] Smart factories represent a new stage in the development of modern factories. To achieve real-time monitoring of the smart factory's production environment, factory managers often deploy numerous intelligent terminal devices. To facilitate the management of the data generated by these devices, factory managers typically store the smart factory data on third-party cloud servers. However, once the data is no longer under the actual control of its owner, data security and privacy issues become particularly prominent. Furthermore, with the automation and intelligentization of manufacturing, various production departments need to achieve deeper communication and cooperation by sharing smart factory data.
[0003] Attribute-based encryption (ABE), as a cryptographic technique enabling one-to-many encrypted sharing, offers unique advantages in solving data security problems. Generally, ABE schemes can be broadly categorized into ciphertext-policy ABE and key-policy ABE. In ciphertext-policy ABE, users can define their own access policies and attach them to the ciphertext. Only data requesters who meet the access policy can correctly decrypt the ciphertext. Therefore, ciphertext-policy ABE is more suitable for data outsourcing applications. However, due to the limited storage and computing resources of devices deployed in smart factories, using cryptographic schemes to protect the confidentiality and privacy of factory data still faces some challenges, especially in reducing computational overhead and verifying data integrity. Applying this type of encryption scheme in smart factory data management, while achieving more flexible data access control, also introduces significant computational overhead because the encryption and decryption operations involve complex calculations such as pairing.
[0004] Blockchain technology, as the underlying technology supporting electronic currency, possesses characteristics such as decentralization, distributed storage, tamper-proofing, and traceability. Beyond its common applications in the financial sector, blockchain technology can also be used to improve the security of data in smart factories. Overall, data sharing solutions combined with blockchain still lack in terms of security and efficiency. As a milestone technology in blockchain development, smart contracts play a crucial role in data sharing.
[0005] How to achieve secure and efficient sharing of factory data with the assistance of blockchain is a technical problem that needs to be solved. Summary of the Invention
[0006] The technical objective of this invention is to address the above-mentioned shortcomings by providing a smart factory data sharing method with blockchain-assisted verification, thereby solving the technical problem of how to achieve secure and efficient sharing of factory data with the assistance of blockchain.
[0007] This invention discloses a smart factory data sharing method with blockchain-assisted verification, applicable between users, blockchain, and cloud computing servers. Users include factory administrators, department managers, and department employees. The method includes the following steps: System initialization: The factory administrator generates system global parameters and an administrator key, stores the administrator key locally, and sends the system global parameters to the department manager, department employees, and the cloud computing server. The department manager and department employees generate key pairs based on the system global parameters. Blockchain registration: Factory administrators, department managers, and department employees submit blockchain registration applications to the blockchain and obtain corresponding blockchain addresses. The blockchain registration application submitted by the factory administrator includes system global parameters, while the blockchain registration applications submitted by the department manager and department employees include the public key in their own key pair. The key pairs of the department manager and department employees are generated based on the system global parameters. Attribute allocation: Department employees submit attribute allocation requests to the factory administrator. Based on the department employees' public keys and blockchain addresses in the attribute allocation requests, the factory administrator allocates attributes to the department employees, returns the allocation results to the department employees, and issues a blockchain registration transaction to the blockchain. The allocation results include the identity identifier generated for the department employees and the set of attributes. The blockchain registration transaction is used to record the corresponding allocation results. Data encryption and upload: For plaintext data to be shared, the department manager performs symmetric encryption on the plaintext based on the symmetric key to generate symmetric ciphertext, and performs attribute encryption on the symmetric key based on the predefined access structure to generate attribute ciphertext. The symmetric ciphertext and attribute ciphertext are then uploaded as ciphertext to the cloud computing server. Attribute key calculation: Department employees submit an attribute key generation request to the factory administrator. The attribute key generation request includes the department employee's own attribute set. The factory administrator generates an attribute key corresponding to the department employee's own attribute set and returns the attribute key to the department employee. The department employee generates a conversion key and a retrieval key based on the attribute key. Encryption Decryption: Department employees submit a data sharing request to the cloud computing server. The cloud computing server performs an ciphertext conversion operation on the specified attribute ciphertext based on the conversion key in the data sharing request, obtains the converted ciphertext, and returns the converted ciphertext and the corresponding symmetric ciphertext to the department employees. The department employees decrypt the converted ciphertext based on the retrieved key, obtain the symmetric key, and decrypt the symmetric ciphertext into plaintext data based on the symmetric key.
[0008] As a preferred method, during the data encryption and uploading process, for the plaintext data to be shared, the department manager calculates the hash value of the plaintext data and the symmetric key as the storage hash value, signs the storage hash value to obtain the storage signature, and sends a blockchain storage transaction to the blockchain. The storage hash value and storage signature are recorded through the blockchain storage transaction. Correspondingly, the method further includes the following steps: Blockchain Verification: For plaintext data obtained through ciphertext decryption, department employees calculate the hash value of the plaintext data and the corresponding symmetric key as the verification hash value, sign the verification hash value, and send a blockchain verification transaction to the blockchain. The blockchain verification transaction records the verification hash value and verification signature. Based on the smart contract, the blockchain compares the stored hash value and stored signature in the blockchain storage transaction with the verification hash value and verification signature in the blockchain verification transaction, generates a verification result, and returns the verification result to the department employees.
[0009] Preferably, system initialization includes the following steps: The factory manager selects a suitable bilinear mapping and two hash functions. The bilinear mapping is as follows: The two hash functions are respectively , ; Factory manager from Four elements are randomly selected from the group, namely: as well as ,from Select a random number from the group The system global parameters are constructed based on the four group elements and a random number. The expression is as follows: , and administrator key Set as follows: , Department manager from Select a random number from the group The public key is used as the private key in its key pair, and the public key is constructed based on the private key. The expression is as follows: ; Department employees from Select a random number from the group The public key is used as the private key in its key pair, and the public key is constructed based on the private key. The expression is as follows: , in, , It is a prime number. Multiplication cyclic group, It is an integer group. It is a multiplication cyclic group The generator.
[0010] As a preferred option, for department employees, blockchain registration and transaction... It is expressed as follows: , in, This indicates string concatenation. This refers to the identity identifier assigned to department employees. This represents the blockchain address of a department employee. This represents the public key of a department employee. This represents a set of attributes assigned to employees in a department.
[0011] As a preferred method, data encryption and uploading include the following steps: Department manager based on symmetric key plaintext data Perform symmetric encryption to generate symmetric ciphertext. The calculation formula is as follows: , in, It is a symmetric encryption algorithm; Define access node ,from Select a set of random numbers from the group and from Select an element from the group Department manager calculates Construct a dimensional vector And calculate The calculation formula for each component of the intermediate ciphertext is as follows, based on the access structure: , in, It is OK A matrix of columns It is a function that maps each row of a matrix to an attribute. Representation matrix The OK, yes The A secret fragment, as well as All are components of the intermediate ciphertext. ; Components that build intermediate ciphertext The calculation formula is as follows: ; The component of the intermediate ciphertext The XOR operation with the symmetric key is calculated using the following formula: ; Construct attribute ciphertext The calculation formula is as follows: , in, This indicates the XOR operation.
[0012] As a preferred method, based on the current device operating status and data sharing requests, the department administrator generates intermediate ciphertext at an opportune time according to a predefined access structure, and combines the symmetric ciphertext and intermediate ciphertext to generate attribute ciphertext at an opportune time.
[0013] As a preferred embodiment, based on the attribute key generation request, the factory administrator generates an attribute key corresponding to the attribute set of the department employees, including the following steps: Factory manager from Select a set of random numbers from the group and set the attribute set ; The factory administrator calculates the various components of the attribute key using the following formula: , in, as well as All are components of attribute keys. ; Components that organize attribute keys based on attribute keys Attribute key The calculation formula is as follows: ; Department employees from Select a random number from the group As the retrieval key The conversion key is calculated by combining its own attribute key with the various components of the conversion key. The calculation formula is as follows: , in, as well as All of these are components for converting keys. ; The components based on the transformation key organize the transformation key. Key conversion The expression is as follows: .
[0014] Preferably, the cloud computing server performs ciphertext conversion on the specified attribute ciphertext based on the conversion key in the data sharing request, including the following steps: Cloud computing servers calculate a set of constants The set of constants satisfy ,in, It is a set of attributes that satisfy the access structure; Cloud computing servers are based on constants The component for calculating the converted ciphertext uses the following formula: , in, as well as All are components for converting ciphertext; The component organizes the transformed ciphertext based on the transformed ciphertext. Represented as: .
[0015] Preferably, department employees use the retrieved key pair to convert and decrypt the ciphertext to obtain the symmetric key, and then use the symmetric key to decrypt the symmetric ciphertext into plaintext data, including the following steps: Based on the retrieved key Calculate the symmetric key symmetric key The calculation formula is as follows: , Based on symmetric key Decrypting symmetric ciphertext yields plaintext data. Plain text data The calculation formula is as follows: , in, It is a symmetric decryption algorithm.
[0016] Preferably, the blockchain stores transactions. The expression is as follows: , in, This indicates the plaintext data to be shared. Indicates the use of plaintext data The symmetric key used for symmetric encryption. This refers to the private key in the department manager's key pair. Indicates the storage of hash values. Indicates the storage signature, This indicates that the timestamp is generated by the blockchain; The blockchain verifies the transaction. The expression is as follows: , in, This refers to the plaintext data obtained by department employees after decrypting the symmetric ciphertext. This represents the symmetric key obtained by department employees from decrypting attribute ciphertext. This refers to the private key in the department's employee key pair. This indicates that the hash value has been verified. This indicates signature verification. This indicates that the timestamp is generated by the blockchain; When comparing the stored hash value and stored signature of a blockchain transaction with the verified hash value and verified signature of a blockchain transaction based on smart contracts, the following two equations are verified to ensure that both are true: , If both equations are true, the verification result is that the plaintext data has not been maliciously tampered with; otherwise, the verification result is that the plaintext data has been maliciously tampered with by the cloud computing server. in, This refers to the public key in the department's employee key pair. This represents the public key in the department manager's key pair.
[0017] The blockchain-assisted verification method for smart factory data sharing of the present invention has the following advantages: 1. Department managers formulate access policies and define corresponding access structures based on security requirements. When encrypting data, department managers encrypt plaintext data using a symmetric encryption algorithm to obtain symmetric ciphertext. Based on the predefined access structure, they encrypt the symmetric key to generate attribute ciphertext. The symmetric ciphertext and attribute ciphertext are then uploaded to the cloud computing server. The cloud computing server performs ciphertext conversion on the specified attribute ciphertext based on the conversion key in the data sharing request to obtain converted ciphertext. The converted ciphertext and the corresponding symmetric ciphertext are then returned to the department employees. Data decryption is then packaged and sent to the cloud computing server. During the decryption phase, the computing power of the cloud server is used to convert the ciphertext and return a converted ciphertext that does not contain complex calculations. The computing power and sufficient storage space of the cloud computing server alleviate the computing pressure on the blockchain and the department employees. 2. When encrypting data, each ciphertext component of the intermediate ciphertext is calculated based on the access structure. The intermediate ciphertext and the symmetric key are combined to construct the attribute ciphertext. During the above calculation process, each ciphertext component can be calculated when the device is idle. The original factory data is encrypted using a symmetric encryption algorithm, and access control policies are used to control access to the symmetric key, which can minimize the computation and communication overhead of the access control process. 3. When encrypting and uploading data, the department manager calculates the hash value and signs the plaintext data to be shared and the corresponding symmetric key, and initiates a blockchain storage transaction. The blockchain storage transaction records the generated storage hash value and storage signature. After obtaining the plaintext data from the decryption operation, the department employee calculates the hash value and signs the plaintext data to be received and the corresponding symmetric key, and initiates a blockchain verification transaction. The blockchain verification transaction records the generated verification hash value and verification signature. The blockchain verifies the hash value and signature recorded in the blockchain storage transaction and the blockchain verification transaction based on a smart contract, and returns the verification result to the department employee. This prevents the cloud computing server from maliciously tampering with the plaintext data and ensures data security. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] The invention will be further described below with reference to the accompanying drawings.
[0020] Figure 1 This is a structural block diagram of the relationship between users, blockchain, and cloud computing servers in a smart factory data sharing method with blockchain-assisted verification, as described in Example 1. Figure 2 This is a flowchart of a smart factory data sharing method with blockchain-assisted verification, as shown in Example 1. Detailed Implementation
[0021] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0022] This invention provides a smart factory data sharing method with blockchain-assisted verification, which addresses the technical problem of how to achieve secure and efficient sharing of factory data with the assistance of blockchain.
[0023] Example 1:
[0024] This invention discloses a smart factory data sharing method with blockchain-assisted verification, which is applied between users, blockchain, and cloud computing servers. Users include factory administrators, department managers, and department employees. The method includes seven steps: system initialization, blockchain registration, attribute allocation, blockchain storage, attribute key calculation, encrypted decryption, and blockchain verification.
[0025] Step S100 System Initialization: The factory administrator generates system global parameters and an administrator key, stores the administrator key locally, and sends the system global parameters to the department manager, department employees, and the cloud computing server. The department manager and department employees generate key pairs based on the system global parameters.
[0026] The specific implementation of system initialization includes the following steps: (1) The factory manager selects a suitable bilinear mapping and two hash functions. The bilinear mapping is as follows: The two hash functions are respectively , ; (2) The factory manager from Four elements are randomly selected from the group, namely: as well as ,from Select a random number from the group The system global parameters are constructed based on the four group elements and a random number. The expression is as follows: , (3) and the administrator key Set as follows: , (4) Department manager from Select a random number from the group The public key is used as the private key in its key pair, and the public key is constructed based on the private key. The expression is as follows: ; (5) Department employees from Select a random number from the group The public key is used as the private key in its key pair, and the public key is constructed based on the private key. The expression is as follows: , in, , It is a prime number. Multiplication cyclic group, It is an integer group. It is a multiplication cyclic group The generator.
[0027] In this embodiment, the multiplicative cyclic group and the bilinear mapping satisfy three conditions: bilinearity, nondegeneracy, and computability.
[0028] Bilinear: for any group element: , ,have and or .
[0029] Non-degeneracy: Assume yes The generators have .
[0030] Computability: For any group element: There exists an efficient method to compute a bilinear mapping. .
[0031] Step S200 Blockchain Registration: The factory administrator, department manager, and department employees submit blockchain registration applications to the blockchain and obtain corresponding blockchain addresses. The blockchain registration application submitted by the factory administrator includes system global parameters, while the blockchain registration applications submitted by the department manager and department employees include the public key in their own key pair. The key pairs of the department manager and department employees are generated based on the system global parameters.
[0032] In this embodiment, based on the user's blockchain registration application, the blockchain address returned to each user serves as the user's identifier.
[0033] Step S300 Attribute Allocation: Department employees submit attribute allocation requests to the factory administrator. Based on the department employees' public keys and blockchain addresses in the attribute allocation requests, the factory administrator allocates attributes to the department employees, returns the allocation results to the department employees, and issues a blockchain registration transaction to the blockchain. The allocation results include the identity identifier and attribute set generated for the department employees. The blockchain registration transaction is used to record the corresponding allocation results.
[0034] As a specific implementation of blockchain registration transactions, blockchain registration transactions It is expressed as follows: , in, This indicates string concatenation. This refers to the identity identifier assigned to department employees. This represents the blockchain address of a department employee. This represents the public key of a department employee. This represents a set of attributes assigned to employees in a department.
[0035] The same applies to the blockchain registration transactions of department managers; subsequent operations in this embodiment do not involve the blockchain registration transactions of department managers.
[0036] Step S400 Data Encryption and Upload: For plaintext data to be shared, the department manager performs symmetric encryption on the plaintext based on the symmetric key to generate symmetric ciphertext, and performs attribute encryption on the symmetric key based on the predefined access structure to generate attribute ciphertext. The symmetric ciphertext and attribute ciphertext are then uploaded as ciphertext to the cloud computing server.
[0037] As a specific implementation of data encryption and uploading, it includes the following steps: (1) Department manager based on symmetric key plaintext data Perform symmetric encryption to generate symmetric ciphertext. The calculation formula is as follows: , in, It is a symmetric encryption algorithm; (2) Define access node ,from Select a set of random numbers from the group and from Select an element from the group Department manager calculates Construct a dimensional vector And calculate The calculation formula for each component of the intermediate ciphertext is as follows, based on the access structure: , in, It is OK A matrix of columns It is a function that maps each row of a matrix to an attribute. Representation matrix The OK, yes The A secret fragment, as well as All are components of the intermediate ciphertext. ; (3) Constructing intermediate ciphertext based on intermediate ciphertext components The calculation formula is as follows: ; (4) Components of the intermediate ciphertext The XOR operation with the symmetric key is calculated using the following formula: ; (5) Construct attribute ciphertext The calculation formula is as follows: , in, This indicates the XOR operation.
[0038] In practice, based on the current operating status of the equipment and data sharing requests, the department administrator generates intermediate ciphertext at an opportune time based on a predefined access structure, and combines the symmetric ciphertext and intermediate ciphertext to generate attribute ciphertext at an opportune time.
[0039] Step S500 Attribute Key Calculation: Department employees submit an attribute key generation request to the factory administrator. The attribute key generation request includes the department employee's own attribute set. The factory administrator generates an attribute key corresponding to the department employee's own attribute set and returns the attribute key to the department employee. The department employee generates a conversion key and a retrieval key based on the attribute key.
[0040] In a specific implementation, based on the attribute key generation request, the factory administrator generates an attribute key corresponding to the attribute set of each department employee, including the following steps: (1) The factory manager from Select a set of random numbers from the group and set the attribute set ; (2) The factory administrator calculates each component of the attribute key using the following formula: , in, as well as All are components of attribute keys. ; (3) Component organization of attribute keys based on attribute keys Attribute key The calculation formula is as follows: ; (4) Department employees from Select a random number from the group As the retrieval key The conversion key is calculated by combining its own attribute key with the various components of the conversion key. The calculation formula is as follows: , in, as well as All of these are components for converting keys. ; (5) Organize the conversion key based on the various components of the conversion key. Key conversion The expression is as follows: .
[0041] Step S600 Ciphertext Decryption: Department employees submit a data sharing request to the cloud computing server. The cloud computing server performs a ciphertext conversion operation on the specified attribute ciphertext based on the conversion key in the data sharing request, obtains the converted ciphertext, and returns the converted ciphertext and the corresponding symmetric ciphertext to the department employees. The department employees decrypt the converted ciphertext based on the retrieved key, obtain the symmetric key, and decrypt the symmetric ciphertext into plaintext data based on the symmetric key.
[0042] In a specific implementation, the cloud computing server performs ciphertext conversion on the specified attribute ciphertext based on the conversion key in the data sharing request, including the following steps: (1) The cloud computing server calculates a set of constants The set of constants satisfy ,in, It is a set of attributes that satisfy the access structure; (2) Cloud computing servers are based on constants The component for calculating the converted ciphertext uses the following formula: , in, as well as All are components for converting ciphertext; (3) Based on the component organization of the transformed ciphertext, the transformed ciphertext is transformed. Represented as: .
[0043] In this embodiment, department employees decrypt the conversion key based on the retrieved key to obtain the symmetric key, and then decrypt the symmetric ciphertext into plaintext data based on the symmetric key, including the following steps: (1) Based on key retrieval Calculate the symmetric key symmetric key The calculation formula is as follows: , (2) Based on symmetric key Decrypting symmetric ciphertext yields plaintext data. Plain text data The calculation formula is as follows: , in, It is a symmetric decryption algorithm.
[0044] Considering the possibility of data tampering by cloud computing servers, the following improvements are made to this embodiment: During the data encryption and uploading process, for the plaintext data to be shared, the department manager calculates the hash value of the plaintext data and the symmetric key as the storage hash value, signs the storage hash value to obtain the storage signature, and sends a blockchain storage transaction to the blockchain. The storage hash value and the storage signature are recorded through the blockchain storage transaction.
[0045] Correspondingly, the method also includes step S600 blockchain verification: For plaintext data obtained through ciphertext decryption, the department employee calculates the hash value of the plaintext data and the corresponding symmetric key as the verification hash value, signs the verification hash value, and sends a blockchain verification transaction to the blockchain. The blockchain verification transaction records the verification hash value and verification signature. Based on the smart contract, the blockchain compares the stored hash value and stored signature in the blockchain storage transaction with the verification hash value and verification signature in the blockchain verification transaction, generates a verification result, and returns the verification result to the department employee.
[0046] As a specific implementation, blockchain stores transactions. The expression is as follows: , in, This indicates the plaintext data to be shared. Indicates the use of plaintext data The symmetric key used for symmetric encryption. This refers to the private key in the department manager's key pair. Indicates the storage of hash values. Indicates the storage signature, This indicates that the timestamp is generated by the blockchain; Blockchain verifies transactions The expression is as follows: , in, This refers to the plaintext data obtained by department employees after decrypting the symmetric ciphertext. This represents the symmetric key obtained by department employees from decrypting attribute ciphertext. This refers to the private key in the department's employee key pair. This indicates that the hash value has been verified. This indicates signature verification. This indicates that the timestamp is generated by the blockchain; In this embodiment, when the blockchain compares the stored hash value and stored signature in the blockchain storage transaction with the verified hash value and verified signature in the blockchain verification transaction based on the smart contract, it verifies whether the following two equations are both true: , If both equations are true, the verification result is that the plaintext data has not been maliciously tampered with; otherwise, the verification result is that the plaintext data has been maliciously tampered with by the cloud computing server. in, This refers to the public key in the department's employee key pair. This represents the public key in the department manager's key pair.
[0047] The method in this embodiment utilizes consortium blockchains (such as Hyperledger Fabric and FISCO BCOS) to construct a blockchain. Factory managers, department managers, and department employees all join the blockchain. The factory managers, department managers, department employees, the blockchain, and the cloud computing server form a data sharing system as entities that realize data sharing.
[0048] The factory administrator is a completely trustworthy authority in a smart factory, responsible for system initialization, generating common parameters, calculating attribute keys for employees with attribute sets, and maintaining the operation of the entire system.
[0049] The department manager is responsible for compiling data collected from equipment in the factory, formulating access policies and creating access structures based on security requirements, encrypting the data, and uploading the encrypted data to the cloud computing server.
[0050] Department staff are the workers of the smart factory, responsible for the daily work of the smart factory department and requesting data from other departments.
[0051] Blockchain is used to record transactions issued by blockchain nodes, including blockchain registration, attribute assignment, and data-related encryption and verification. The hash value of the data is also stored on the blockchain.
[0052] Cloud servers have powerful computing capabilities and ample storage space, allowing department employees to outsource computationally expensive tasks such as bilinear pairing to cloud servers.
[0053] The present invention has been shown and described in detail above with reference to the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above embodiments, those skilled in the art will know that more embodiments of the present invention can be obtained by combining the means in the different embodiments described above, and these embodiments are also within the protection scope of the present invention.
Claims
1. A smart factory data sharing method with blockchain-assisted verification, characterized in that, This method, applied between users, blockchain, and cloud computing servers, where users include factory administrators, department managers, and department employees, includes the following steps: System initialization: The factory administrator generates system global parameters and an administrator key, stores the administrator key locally, and sends the system global parameters to the department manager, department employees, and the cloud computing server. The department manager and department employees generate key pairs based on the system global parameters. Blockchain registration: Factory administrators, department managers, and department employees submit blockchain registration applications to obtain corresponding blockchain addresses. The blockchain registration application submitted by the factory administrator includes system global parameters, while the blockchain registration applications submitted by the department manager and department employees include the public key in their own key pair. The key pairs of the department manager and department employees are generated based on the system global parameters. Attribute allocation: Department employees submit attribute allocation requests to the factory administrator. Based on the department employees' public keys and blockchain addresses in the attribute allocation requests, the factory administrator allocates attributes to the department employees, returns the allocation results to the department employees, and issues a blockchain registration transaction to the blockchain. The allocation results include the identity identifier generated for the department employees and the set of attributes. The blockchain registration transaction is used to record the corresponding allocation results. Data encryption and upload: For plaintext data to be shared, the department manager performs symmetric encryption on the plaintext based on the symmetric key to generate symmetric ciphertext, and performs attribute encryption on the symmetric key based on the predefined access structure to generate attribute ciphertext. The symmetric ciphertext and attribute ciphertext are then uploaded as ciphertext to the cloud computing server. Attribute key calculation: Department employees submit an attribute key generation request to the factory administrator. The attribute key generation request includes the department employee's own attribute set. The factory administrator generates an attribute key corresponding to the department employee's own attribute set and returns the attribute key to the department employee. The department employee generates a conversion key and a retrieval key based on the attribute key. Ciphertext decryption: Department employees submit a data sharing request to the cloud computing server. The cloud computing server performs a ciphertext conversion operation on the specified attribute ciphertext based on the conversion key in the data sharing request, obtains the converted ciphertext, and returns the converted ciphertext and the corresponding symmetric ciphertext to the department employees. The department employees decrypt the converted ciphertext based on the retrieved key to obtain the symmetric key, and then decrypt the symmetric ciphertext into plaintext data based on the symmetric key. The system initialization includes the following steps: The factory manager selects a bilinear mapping and two hash functions. The bilinear mapping is... The two hash functions are respectively , ; Factory manager from Four elements are randomly selected from the group, namely: as well as ,from Select a random number from the group The system global parameters are constructed based on the four group elements and a random number. The expression is as follows: , and administrator key Set as follows: , Department manager from Select a random number from the group The public key is used as the private key in its key pair, and the public key is constructed based on the private key. The expression is as follows: , Department employees from Select a random number from the group The public key is used as the private key in its key pair, and the public key is constructed based on the private key. The expression is as follows: , in, It is a prime number. Multiplication cyclic group, It is an integer group. It is a multiplication cyclic group Generators; For department employees, blockchain registration transactions It is expressed as follows: , in, This indicates string concatenation. This refers to the identity identifier assigned to department employees. This represents the blockchain address of a department employee. This represents the public key of a department employee. This represents a set of attributes assigned to department employees; Data encryption and uploading include the following steps: Department manager based on symmetric key plaintext data Perform symmetric encryption to generate symmetric ciphertext. The calculation formula is as follows: , in, It is a symmetric encryption algorithm; Define access structure ,from Select a set of random numbers from the group and from Select an element from the group Department manager calculates Construct a dimensional vector And calculate The calculation formula for each component of the intermediate ciphertext is as follows, based on the access structure: , , , , , , in, It is OK A matrix of columns It is a function that maps each row of a matrix to an attribute. Representation matrix The OK, yes The A secret fragment, , , , , as well as All are components of the intermediate ciphertext. ; Components that build intermediate ciphertext The calculation formula is as follows: , The component of the intermediate ciphertext The XOR operation with the symmetric key is calculated using the following formula: , Construct attribute ciphertext The calculation formula is as follows: , in, This indicates the XOR operation.
2. The smart factory data sharing method with blockchain-assisted verification according to claim 1, characterized in that, During the data encryption and uploading process, for the plaintext data to be shared, the department manager calculates the hash value of the plaintext data and the symmetric key as the storage hash value, signs the storage hash value to obtain the storage signature, and sends a blockchain storage transaction to the blockchain. The storage hash value and storage signature are recorded through the blockchain storage transaction. Correspondingly, the method further includes the following steps: Blockchain Verification: For plaintext data obtained through ciphertext decryption, department employees calculate the hash value of the plaintext data and the corresponding symmetric key as the verification hash value, sign the verification hash value, and send a blockchain verification transaction to the blockchain. The blockchain verification transaction records the verification hash value and verification signature. Based on the smart contract, the blockchain compares the stored hash value and stored signature in the blockchain storage transaction with the verification hash value and verification signature in the blockchain verification transaction, generates a verification result, and returns the verification result to the department employees.
3. The smart factory data sharing method with blockchain-assisted verification according to claim 1, characterized in that, Based on the current operating status of the equipment and the data sharing request, the department manager generates intermediate ciphertext at an opportune time based on the predefined access structure, and combines the symmetric ciphertext and intermediate ciphertext to generate attribute ciphertext at an opportune time.
4. The smart factory data sharing method with blockchain-assisted verification according to claim 1, characterized in that, Based on the attribute key generation request, the factory administrator generates an attribute key corresponding to the attribute set of each department employee, including the following steps: Factory manager from Select a set of random numbers from the group and set the attribute set ; The factory administrator calculates the various components of the attribute key using the following formula: , , , , in, , , as well as All are components of attribute keys. ; Components that organize attribute keys based on attribute keys Attribute key The calculation formula is as follows: ; Department employees from Select a random number from the group As the retrieval key The conversion key is calculated by combining its own attribute key with the various components of the conversion key. The calculation formula is as follows: , , , , in, , , as well as All of these are components for converting keys. ; The components based on the transformation key organize the transformation key. Key conversion The expression is as follows: 。 5. The smart factory data sharing method with blockchain-assisted verification according to claim 4, characterized in that, The cloud computing server performs ciphertext conversion on the specified attribute ciphertext based on the conversion key in the data sharing request, including the following steps: Cloud computing servers calculate a set of constants The set of constants satisfy ,in, It is a set of attributes that satisfy the access structure; Cloud computing servers are based on constants The component for calculating the converted ciphertext uses the following formula: , , , in, , as well as All are components for converting ciphertext; The component organizes the transformed ciphertext based on the transformed ciphertext. Represented as: 。 6. The smart factory data sharing method with blockchain-assisted verification according to claim 5, characterized in that, Department employees use the retrieved key pair to convert ciphertext into a symmetric key, and then use the symmetric key to decrypt the symmetric ciphertext into plaintext data, including the following steps: Based on the retrieved key Calculate the symmetric key symmetric key The calculation formula is as follows: , Based on symmetric key Decrypting symmetric ciphertext yields plaintext data. Plain text data The calculation formula is as follows: , in, It is a symmetric decryption algorithm.
7. The smart factory data sharing method with blockchain-assisted verification according to claim 6, characterized in that, Blockchain storage transactions The expression is as follows: , , , in, This indicates the plaintext data to be shared. Indicates the use of plaintext data The symmetric key used for symmetric encryption. This refers to the private key in the department manager's key pair. Indicates the storage of hash values. Indicates the storage signature, This represents a timestamp, which is generated by the blockchain. Blockchain verifies transactions The expression is as follows: , , , in, This refers to the plaintext data obtained by department employees after decrypting the symmetric ciphertext. This represents the symmetric key obtained by department employees from decrypting attribute ciphertext. This refers to the private key in the department's employee key pair. This indicates that the hash value has been verified. This indicates signature verification. This represents a timestamp, which is generated by the blockchain. When comparing the stored hash value and stored signature of a blockchain transaction with the verified hash value and verified signature of a blockchain transaction based on smart contracts, the following two equations are verified to ensure that both are true: , , If both equations are true, the verification result is that the plaintext data has not been maliciously tampered with; otherwise, the verification result is that the plaintext data has been maliciously tampered with by the cloud computing server. in, This refers to the public key in the department's employee key pair. This represents the public key in the department manager's key pair.
Citation Information
Patent Citations
Cloud data sharing method based on block chain
CN112019591A
Mobile medical internet of things fine-grained access control method and system based on block chain
CN115987592A
