High-speed rail data storage and tracing method based on alliance chain and attribute-based encryption
By adopting alliance chain and attribute-based encryption technology in high-speed rail data management, the problems of privacy leakage, private key management security and data supervision in the traditional high-speed rail data management model are solved, and efficient and secure data storage and sharing are achieved.
Patent Information
- Application Number
- CN202411521857.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-11
AI Technical Summary
The traditional high-speed rail data management model relies on centralized storage and access control solutions, and poses privacy leakage risks, security issues in user private key management, and data life cycle supervision difficulties.
Using high-speed rail data storage and traceability methods based on alliance chain and attribute-based encryption, user keys are generated and managed through Shamir threshold sharing technology, data is encrypted using attribute-based encryption technology, and data upload and sharing process is supervised through multiple channels. .
It significantly improves the security and recoverability of private keys, enhances the flexibility and privacy of data sharing, optimizes system performance, and improves the transparency of behavioral supervision.
Smart Images

Figure CN119420476A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of traffic flow tracing analysis, and in particular relates to a method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption. Background Art
[0002] With the rapid development of high-speed railways around the world, the massive amount of data generated during high-speed railway operations has become a key resource for railway system management, maintenance, and operation optimization. High-speed railway data involves many aspects such as train scheduling, passenger information, and equipment maintenance, and is extremely private and important. Therefore, how to effectively and securely store, share, and manage this data has become a major challenge for current railway information systems.
[0003] Traditional high-speed rail data management models usually rely on centralized storage and access control solutions. Although this approach can achieve centralized data management to a certain extent, it also has many security risks and limitations: Privacy leakage risk: High-speed rail data contains a large amount of sensitive information, such as passenger identity data, operation scheduling information, etc. Once leaked, it may cause serious privacy problems and economic losses.
[0004] Security issues of user private key management: In blockchain or distributed systems, the user's private key is the key to access data and identity authentication. Traditional private key management methods, such as local storage or third-party hosting, have the risk of private keys being lost, stolen, or unrecoverable.
[0005] Data lifecycle supervision issues: In the process of sharing high-speed rail data, it is necessary to ensure the circulation of data among multiple parties, and to strictly supervise the use of data to ensure the legality and security of the data. Summary of the invention
[0006] In response to the above-mentioned deficiencies in the prior art, the method for high-speed rail data storage and traceability based on alliance chain and attribute-based encryption provided by the present invention solves the problem that the traditional high-speed rail data management model usually relies on centralized storage and access control solutions, which has many security risks and limitations.
[0007] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption, comprising the following steps: S1, using a distributed key generation and management solution based on Shamir threshold sharing to generate and store keys for users; S2. Use a data encryption scheme based on attribute-based encryption to encrypt the data uploaded by the user that needs to be encrypted; S3. Use multiple channels to supervise the data upload and sharing process, forming a blockchain-based high-speed rail data storage and sharing solution.
[0008] Further: S1 comprises the following sub-steps: S11, initializing basic parameters of the system according to the system initialization function, and selecting security parameters to generate public parameters; S12. The alliance chain nodes conduct legitimacy verification based on public parameters, generate keys after passing the legitimacy verification, and perform distributed storage of the keys.
[0009] Further: the S11 is specifically: According to the system initialization function, the first prime number is generated through negotiation during the initialization phase. , and use the first prime number Generate elliptic curve group , and the first generator of the elliptic curve group and the second generator , define a collision-resistant hash function , select security parameters to generate public parameters , .
[0010] Further: S12 includes the following sub-steps: S121. The alliance chain node randomly selects a polynomial according to the public parameters to calculate and broadcast the attribute value, thereby calculating the first value to be verified; Among them, the expression of the polynomial Specifically:
[0011] In the formula, is the broadcast attribute value of the node, k is the order of terms in the polynomial, , n is the total number of alliance chain nodes, x is the input variable of the polynomial; No. i Alliance chain nodes Calculated property values The specific expression is:
[0012] In the formula, is a modular operation; The first value to be verified The specific expression is:
[0013] S122, controlling each alliance chain node to send a secret value to other alliance chain nodes, locally calculating a second value to be verified, and performing a legitimacy verification based on the first value to be verified and the second value to be verified. If the value meets the verification formula, the legitimacy verification is passed; Among them, the second value to be verified The specific expression is:
[0014] In the formula, For the i The alliance chain node sends j The secret value sent by the alliance chain node is expressed as follows:
[0015] In the formula, , N , is a polynomial; S123, after passing the legality verification, is generated by each alliance chain node Private key, calculation Public key, update the public parameters according to the public key, store it in the genesis block, and deploy Public key query contract; Among them, calculation Public Key The specific expression is:
[0016] In the formula, for Private key; S124. Generate a key for the user and register an identity, specifically: Based on the identity request initiated by the user, the CA system generates a key based on the private key and public key ;
[0017]
[0018]
[0019] In the formula, is the first random number, is a positive integer, The private key of the user calculated by the CA system, For the first hash function defined, The public key of the user calculated by the CA system, To transfer the private key of the certificate; S125. Generate a shadow key for the user and perform distributed storage of the key. The method for performing distributed storage of the key is specifically as follows: From a finite field Select different non-zero elements Corresponding to each shadow secret holding node , generate shadow secrets for shadow secret holding nodes , where the shadow secret The specific expression is:
[0020] In the formula, is the second largest prime number, and , , and is the coefficient; The shadow secret holding node is used when the user requests to generate a key again. Shadow Secret Holding Nodes By using the Lagrange interpolation formula to recover the user Private key;
[0021] In the formula, is the recovery function, for The first set of distinct non-zero elements, for The second set consists of different non-zero elements.
[0022] Further: S2 is specifically: (1) Public parameter generation in the encryption phase: Take the first public parameter and the second public parameter of the random number generation system and store them in the public parameters of the encryption phase; Among them, the first public parameter and the second public parameter The specific expression is:
[0023]
[0024] In the formula, is the second random number, is the third random number, , is the intermediate value in the first calculation process, f is the intermediate value in the second calculation process; (2) Calculate the attribute private key based on the attribute-based decryption private key generation function: The user uploads the data to be encrypted and sets the data access policy set , through the trust center to set data access policies Generate the corresponding attribute private key , used to decrypt encrypted data; The expression of the attribute-based decryption private key generation function is as follows:
[0025] In the formula, j For related attributes, r is the fourth random number, r j is the fifth random number, , is the intermediate value in the third calculation process, is the intermediate value in the fourth calculation process, is the intermediate value in the fifth calculation process, The second hash function defined; (3) Calculate the ciphertext based on the attribute-based encryption function: the access control tree set by the user Encrypt the plaintext data uploaded by the user to obtain the ciphertext , call FabricSDK to upload to the blockchain for storage; The expression of the attribute-based encryption function is as follows:
[0026] In the formula, s is the sixth random number, , About A random polynomial of M is plain text data, is the intermediate value in the fifth calculation process, is the intermediate value in the sixth calculation process, y is the intermediate value in the seventh calculation process, Y is the intermediate value in the eighth calculation process, is the intermediate value in the ninth calculation process, is the intermediate value in the tenth calculation process, is the intermediate value in the eleventh calculation process; (4) Calculate the plaintext data through the attribute-based decryption function:
[0027] In the formula, is a bilinear function.
[0028] Further: In S3, the traceability process supervision plan is specifically as follows: Use multiple channels to fully supervise the data upload and sharing process, and set up behavior supervision channels and smart contracts to track and record behavior information.
[0029] The beneficial effects of the present invention are as follows: the present invention provides a method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption, which has the following effects compared to the traditional high-speed rail data management mode which usually relies on centralized storage and access control solutions: (1) Significantly improved security and recoverability of private keys: The present invention uses Shamir threshold sharing technology to divide the user's private key into multiple sub-keys for decentralized storage, avoiding the risk of irrecoverable failure caused by single point failure or loss of private keys. This solution improves the security of private key management. Even if some nodes fail, the complete private key can be restored through the sub-keys. The security of this solution is much higher than that of traditional centralized or third-party managed private key management methods, reducing the probability of private key loss and ensuring the fault tolerance of the system.
[0030] (2) The flexibility and privacy of data sharing are greatly enhanced: fine-grained access control is achieved using attribute encryption technology, and only users who meet specific conditions can decrypt data. This mechanism improves the security and flexibility of data sharing, especially in the high-speed rail data scenario, which can accurately control which users or systems have access rights to ensure the security of data sharing. By setting different access conditions, it can adapt to the complex high-speed rail data management needs and reduce unnecessary data leakage risks.
[0031] (3) System performance optimization: The on-chain and off-chain combination solution of the present invention effectively alleviates the storage pressure on the chain, stores large-scale data off-chain, and only uploads core metadata to the chain, thereby reducing the load of on-chain operations. This architecture optimizes the performance of the system, allowing it to maintain high efficiency and stability when processing large amounts of high-speed rail data, and reducing resource consumption for data transmission and storage.
[0032] (4) Improved transparency of behavior supervision: By putting user behavior information on the chain through smart contracts, real-time supervision of operational behavior is achieved. Combining the behavior supervision channel and the smart contract mechanism, it ensures that each user operation can be fully recorded and tracked, improving the compliance and transparency of the high-speed rail data management process. This mechanism helps to promptly discover and correct potential violations, improving the security of the system and the legality of operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flow chart of the method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption in the present invention.
[0034] Figure 2This is a flow chart of a distributed key generation and management scheme based on Shamir threshold sharing.
[0035] Figure 3 Flowchart of a data encryption scheme based on attribute-based encryption.
[0036] Figure 4 It is a logical flow chart of the smart contract. DETAILED DESCRIPTION
[0037] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0038] like Figure 1 As shown, in one embodiment of the present invention, a method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption includes the following steps: S1, using a distributed key generation and management solution based on Shamir threshold sharing to generate and store keys for users; S2. Use a data encryption scheme based on attribute-based encryption to encrypt the data uploaded by the user that needs to be encrypted; S3. Use the traceability process supervision scheme to supervise the data upload and sharing process, and form a blockchain-based high-speed rail data storage and sharing solution.
[0039] like Figure 2 As shown, in this embodiment, S1 includes the following sub-steps: S11, initializing basic parameters of the system according to the system initialization function, and selecting security parameters to generate public parameters; S12. The alliance chain nodes conduct legitimacy verification based on public parameters, generate keys after passing the legitimacy verification, and perform distributed storage of the keys.
[0040] In this embodiment, considering that most of the current attribute-based encryption schemes ignore the confidentiality of user private keys and do not provide substantial application solutions, the present invention performs credibility verification on nodes involved in key generation and management to prevent nodes from committing malicious acts.
[0041] The S11 is specifically: According to the system initialization function, the first prime number is generated through negotiation during the initialization phase. , and use the first prime number Generate elliptic curve group , and the first generator of the elliptic curve group and the second generator , define a collision-resistant hash function , select security parameters to generate public parameters , .
[0042] The S12 comprises the following sub-steps: S121. The alliance chain node randomly selects a polynomial according to the public parameters to calculate and broadcast the attribute value, thereby calculating the first value to be verified; Among them, the expression of the polynomial Specifically:
[0043] In the formula, is the broadcast attribute value of the node, k is the order of terms in the polynomial, , n is the total number of alliance chain nodes, x is the input variable of the polynomial; No. i Alliance chain nodes Calculated property values The specific expression is:
[0044] In the formula, is a modular operation; The first value to be verified The specific expression is:
[0045] S122, controlling each alliance chain node to send a secret value to other alliance chain nodes, locally calculating a second value to be verified, and performing a legitimacy verification based on the first value to be verified and the second value to be verified. If the value meets the verification formula, the legitimacy verification is passed; Among them, the second value to be verified The specific expression is:
[0046] In the formula, For the i The alliance chain node sends j The secret value sent by the alliance chain node is expressed as follows:
[0047] In the formula, , N , is a polynomial; The combined verification formula is as follows:
[0048] In this embodiment, the legitimacy and identity validity of the user are verified through the received user identity information. If the user identity is legitimate, the key generation step will continue.
[0049] S123, after passing the legality verification, is generated by each alliance chain node Private key, calculation Public key, update the public parameters according to the public key, store it in the genesis block, and deploy Public key query contract; Among them, calculation Public Key The specific expression is:
[0050] In the formula, for Private key; S124. Generate a key for the user and register an identity, specifically: Based on the identity request initiated by the user, the CA system generates a key based on the private key and public key ;
[0051]
[0052]
[0053] In the formula, is the first random number, is a positive integer, The private key of the user calculated by the CA system, For the first hash function defined, The public key of the user calculated by the CA system, To transfer the private key of the certificate; The user verifies whether the verification is successful. If the verification is successful, the registration is successful. In this embodiment, the public key Will be stored in the blockchain for other nodes to query, the private key It will not be delivered directly to the user, but through The threshold sharing scheme is used to split and distribute the private key. pass Threshold secret sharing is split into several shadow secrets , these subkeys are stored on different shadow secret holding nodes.
[0054] S125. Generate a shadow key for the user and perform distributed storage of the key. The method for performing distributed storage of the key is specifically as follows: From a finite field Select different non-zero elements Corresponding to each shadow secret holding node , generate shadow secrets for shadow secret holding nodes , where the shadow secret The specific expression is:
[0055] In the formula, is the second largest prime number, and , , and is the coefficient; The shadow secret holding node is used when the user requests to generate a key again. Shadow Secret Holding Nodes By using the Lagrange interpolation formula to recover the user Private key;
[0056] In the formula, is a recovery function used to construct a Lagrange interpolation polynomial through a second set of different non-zero elements to recover the secret value, for The first set of distinct non-zero elements, for The second set consists of different non-zero elements.
[0057] In this embodiment, when a user needs to use a private key for encryption or decryption, the user sends a request to the system through a node to restore the complete private key. After receiving the request, the node initiates a request to other nodes storing subkeys to collect enough subkeys. Each node holds part of the subkeys of the user's private key. The node will collect subkeys from these nodes only when there are no less than When the subkey is returned, Threshold sharing restores the complete private key. When a sufficient number of subkeys are successfully collected, the system combines these subkeys through the Lagrange interpolation formula to restore the complete private key. , the complete private key will be returned to the user for the encryption or decryption operations they need.
[0058] like Figure 3 As shown, in this embodiment, S2 is specifically: (1) Public parameter generation in the encryption phase: Take the first public parameter and the second public parameter of the random number generation system and store them in the public parameters of the encryption phase; Among them, the first public parameter and the second public parameter The specific expression is:
[0059]
[0060] In the formula, is the second random number, is the third random number, , is the intermediate value in the first calculation process, f is the intermediate value in the second calculation process; (2) Calculate the attribute private key based on the attribute-based decryption private key generation function: The user uploads the data to be encrypted and sets the data access policy set , through the trust center to set data access policies Generate the corresponding attribute private key , used to decrypt encrypted data; The expression of the attribute-based decryption private key generation function is as follows:
[0061] In the formula, j For related attributes, r is the fourth random number, r j is the fifth random number, , is the intermediate value in the third calculation process, is the intermediate value in the fourth calculation process, is the intermediate value in the fifth calculation process, The second hash function defined; (3) Calculate the ciphertext based on the attribute-based encryption function: the access control tree set by the user Encrypt the plaintext data uploaded by the user to obtain the ciphertext , call FabricSDK to upload to the blockchain for storage; The expression of the attribute-based encryption function is as follows:
[0062] In the formula, s is the sixth random number, , About A random polynomial of Mis plain text data, is the intermediate value in the fifth calculation process, is the intermediate value in the sixth calculation process, y is the intermediate value in the seventh calculation process, Y is the intermediate value in the eighth calculation process, is the intermediate value in the ninth calculation process, is the intermediate value in the tenth calculation process, is the intermediate value in the eleventh calculation process; (4) Calculate the plaintext data through the attribute-based decryption function:
[0063] In the formula, is a bilinear function.
[0064] In this embodiment, the data encryption scheme based on attribute-based encryption adopts a storage method that combines on-chain and off-chain, performs attribute-based encryption processing on the on-chain data, and performs symmetrical encryption processing on the off-chain data. The data is securely shared by setting the access attribute structure, effectively solving the problem of data confidentiality.
[0065] In S3, the traceability process supervision plan is specifically as follows: Use multiple channels to fully supervise the data upload and sharing process, and set up behavior supervision channels and smart contracts to track and record behavior information.
[0066] In this embodiment, the present invention is designed with multiple channels, adds a behavior supervision channel, designs a behavior information structure, calls the smart contract to upload the behavior information to the chain, and realizes effective supervision of the behavior information. The smart contract logic is as follows: Figure 4 Finally, in order to prevent data leakage and improper permission access, only supervisory user nodes are allowed to join this channel to achieve physical data isolation, enable supervisory users to fully supervise the data upload and sharing process, improve the system's supervisory ability, effectively constrain the legality of behavior, and accurately and timely locate any problems that arise.
[0067] The beneficial effects of the present invention are as follows: the present invention provides a method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption, which has the following effects compared to the traditional high-speed rail data management mode which usually relies on centralized storage and access control solutions: Significantly improved security and recoverability of private keys: The present invention uses Shamir threshold sharing technology to divide the user's private key into multiple sub-keys for decentralized storage, avoiding the risk of irrecoverable failure caused by single point failure or loss of private keys. This solution improves the security of private key management. Even if some nodes fail, the complete private key can be restored through the sub-keys. The security of this solution is much higher than the traditional centralized or third-party managed private key management method, reducing the probability of private key loss and ensuring the fault tolerance of the system.
[0068] The flexibility and privacy of data sharing are greatly enhanced: fine-grained access control is achieved using attribute encryption technology, and only users who meet specific conditions can decrypt data. This mechanism improves the security and flexibility of data sharing, especially in high-speed rail data scenarios, which can accurately control which users or systems have access rights to ensure the security of data sharing. By setting different access conditions, it can adapt to complex high-speed rail data management needs and reduce unnecessary data leakage risks.
[0069] System performance optimization: The on-chain and off-chain combination scheme of the present invention effectively alleviates the storage pressure on the chain, stores large-scale data off-chain, and only uploads core metadata to the chain, thereby reducing the load of on-chain operations. This architecture optimizes the performance of the system, enables high efficiency and stability to be maintained when processing large amounts of high-speed rail data, and reduces resource consumption for data transmission and storage.
[0070] Improved transparency of behavior supervision: User behavior information is put on the chain through smart contracts, realizing real-time supervision of operational behavior. Combining the behavior supervision channel and smart contract mechanism, it ensures that each user operation can be fully recorded and tracked, improving the compliance and transparency of the high-speed rail data management process. This mechanism helps to timely discover and correct potential violations, improving the security of the system and the legality of operations.
[0071] In the description of the present invention, it is necessary to understand that the orientation or positional relationship indicated by the terms "center", "thickness", "upper", "lower", "horizontal", "top", "bottom", "inner", "outer", "radial", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", and "third" are used only for descriptive purposes, and cannot be understood as indicating or implying the relative importance or the number of implicitly specified technical features. Therefore, the features defined by "first", "second", and "third" may explicitly or implicitly include one or more of the features.
Claims
1. A method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption, characterized in that: The following steps are involved: S1, using a distributed key generation and management solution based on Shamir threshold sharing to generate and store keys for users; S2. Use a data encryption scheme based on attribute-based encryption to encrypt the data uploaded by the user that needs to be encrypted; S3. Use the traceability process supervision scheme to supervise the data upload and sharing process, and form a blockchain-based high-speed rail data storage and sharing solution.
2. The method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption according to claim 1 is characterized in that: The S1 comprises the following sub-steps: S11, initializing basic parameters of the system according to the system initialization function, and selecting security parameters to generate public parameters; S12. The alliance chain nodes conduct legitimacy verification based on public parameters, generate keys after passing the legitimacy verification, and perform distributed storage of the keys.
3. The method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption according to claim 2 is characterized in that: The S11 is specifically: According to the system initialization function, the first prime number is generated through negotiation during the initialization phase. , and use the first prime number Generate elliptic curve group , and the first generator of the elliptic curve group and the second generator , define a collision-resistant hash function , select security parameters to generate public parameters , .
4. The method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption according to claim 3 is characterized in that: The S12 comprises the following sub-steps: S121. The alliance chain node randomly selects a polynomial according to the public parameters to calculate and broadcast the attribute value, thereby calculating the first value to be verified; Among them, the expression of the polynomial Specifically: In the formula, is the broadcast attribute value of the node, k is the order of terms in the polynomial, , n is the total number of alliance chain nodes, x is the input variable of the polynomial; No. i Alliance chain nodes Calculated property values The specific expression is: In the formula, It is a modular operation; The first value to be verified The specific expression is: S122, controlling each alliance chain node to send a secret value to other alliance chain nodes, locally calculating a second value to be verified, and performing a legitimacy verification based on the first value to be verified and the second value to be verified. If the value meets the verification formula, the legitimacy verification is passed; Among them, the second value to be verified The specific expression is: In the formula, For the i The alliance chain node sends j The secret value sent by the alliance chain node is expressed as follows: In the formula, , N , is a polynomial; S123, after passing the legality verification, is generated by each alliance chain node Private key, calculation Public key, update the public parameters according to the public key, store it in the genesis block, and deploy Public key query contract; Among them, calculation Public Key The specific expression is: In the formula, for Private key; S124. Generate a key for the user and register an identity, specifically: Based on the identity request initiated by the user, the CA system generates a key based on the private key and public key ; In the formula, is the first random number, is a positive integer, The private key of the user calculated by the CA system, For the first hash function defined, The public key of the user calculated by the CA system, To transfer the private key of the certificate; S125. Generate a shadow key for the user and perform distributed storage of the key. The method for performing distributed storage of the key is specifically as follows: From a finite field Select different non-zero elements Corresponding to each shadow secret holding node , generate shadow secrets for shadow secret holding nodes , where the shadow secret The specific expression is: In the formula, is the second largest prime number, and , , and is the coefficient; The shadow secret holding node is used when the user requests to generate a key again. Shadow Secret Holding Nodes By using the Lagrange interpolation formula to recover the user Private key; In the formula, is the recovery function, for The first set of distinct non-zero elements, for The second set consists of different non-zero elements.
5. The method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption according to claim 4 is characterized in that: The S2 is specifically: (1) Public parameter generation in the encryption phase: Take the first public parameter and the second public parameter of the random number generation system and store them in the public parameters of the encryption phase; Among them, the first public parameter and the second public parameter The specific expression is: In the formula, is the second random number, is the third random number, , is the intermediate value in the first calculation process, f is the intermediate value in the second calculation process; (2) Calculate the attribute private key based on the attribute-based decryption private key generation function: The user uploads the data to be encrypted and sets the data access policy set , through the trust center to set data access policies Generate the corresponding attribute private key , used to decrypt encrypted data; The expression of the attribute-based decryption private key generation function is as follows: In the formula, j For related attributes, r is the fourth random number, r j is the fifth random number, , is the intermediate value in the third calculation process, is the intermediate value in the fourth calculation process, is the intermediate value in the fifth calculation process, The second hash function defined; (3) Calculate the ciphertext based on the attribute-based encryption function: the access control tree set by the user Encrypt the plaintext data uploaded by the user to obtain the ciphertext , call FabricSDK to upload to the blockchain for storage; The expression of the attribute-based encryption function is as follows: In the formula, s is the sixth random number, , For about A random polynomial of M is plain text data, is the intermediate value in the fifth calculation process, is the intermediate value in the sixth calculation process, y is the intermediate value in the seventh calculation process, Y is the intermediate value in the eighth calculation process, is the intermediate value in the ninth calculation process, is the intermediate value in the tenth calculation process, is the intermediate value in the eleventh calculation process; (4) Calculate the plaintext data through the attribute-based decryption function: In the formula, is a bilinear function.
6. The method for storing and tracing high-speed rail data based on alliance chain and attribute-based encryption according to claim 1 is characterized in that: In S3, the traceability process supervision plan is specifically as follows: Use multiple channels to fully supervise the data upload and sharing process, and set up behavior supervision channels and smart contracts to track and record behavior information.