Lightweight encryption transmission method for inspection and detection data based on block chain
By adopting a lightweight encrypted transmission method based on blockchain, combining lightweight encryption technology with blockchain distributed technology, the security and stability issues in inspection and testing data transmission are solved, achieving end-to-end traceability and efficient transmission, which is suitable for large-scale inspection and testing data transmission scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG INSTITUTE OF QUALITY SCIENCES
- Filing Date
- 2026-03-10
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies struggle to achieve efficient, secure, and stable transmission of testing and inspection data, and there are single points of security vulnerability at proxy nodes and aggregation nodes. Blockchain technology also suffers from performance bottlenecks and excessive resource consumption when processing large amounts of data, making it difficult to achieve end-to-end data traceability.
A lightweight encrypted transmission method based on blockchain is adopted, which combines lightweight encryption technology with blockchain distributed technology to build a transmission channel that is secure, efficient and traceable. Through the framework of IoT devices, data holders, edge computing nodes, attribute authorization agencies and blockchain, data encryption and decryption are performed using the national cryptographic SM2, SM4 and CP-ABE algorithms, and channel selection is optimized by combining a multi-input output model.
It improves the stability and anti-attack capabilities of the data transmission system, reduces computing power and resource consumption, achieves end-to-end traceability, ensures the security and efficiency of data transmission, adapts to large-scale detection data transmission scenarios, and meets the industry's dual needs for data security and efficient transmission.
Smart Images

Figure CN121967075A_ABST
Abstract
Description
A Lightweight Encrypted Transmission Method for Inspection and Testing Data Based on Blockchain Technical Field
[0001] This application belongs to the field of data transmission technology, specifically a lightweight encrypted transmission method for inspection and testing data based on blockchain. Background Technology
[0002] Data is a core asset driving the development of various industries, especially testing and inspection data. As a crucial basis for product quality control, industry supervision, and scientific research, it not only possesses immense value but also concerns public safety, health, and the stable operation of the economy. However, testing and inspection data faces numerous severe security threats during transmission and storage, such as data leakage, tampering, and unauthorized access. Once testing and inspection data is attacked, it can lead to serious consequences. Therefore, adopting effective methods to achieve secure and encrypted transmission of testing and inspection data has become a current research hotspot.
[0003] Currently, industry scholars have conducted extensive research, and various encrypted transmission schemes have been applied in different scenarios. However, existing technologies still have many shortcomings and are difficult to adapt to the actual needs of efficient, secure, and stable transmission of inspection and testing data. Existing data encryption transmission technologies mainly suffer from the following typical defects: First, using proxy re-encryption technology to process PCNs data aims to achieve the dual goals of secure data transmission and flexible transfer of access permissions. However, when proxy nodes process data, they are usually limited to local node transfers, making it difficult to achieve end-to-end data traceability. Furthermore, the proxy node itself may become a security risk point; if attacked during data transmission, it may cause the entire transmission link to be interrupted, affecting system reliability. Second, using key generation modules installed on each sensor node to obtain keys, combined with lightweight encryption algorithms to encrypt data, and then managing and updating keys through a aggregation node to decrypt the plaintext data. However, this architecture design makes the aggregation node a critical risk point; if this node fails or its performance cannot meet processing requirements, it will have a significant impact on network stability and data transmission efficiency. Third, by storing encrypted industrial control data in the blockchain and using smart contracts to automatically verify consistency at each stage of data transmission, the data is ensured to remain tamper-proof during transmission. However, blockchain technology faces performance bottlenecks and excessive resource consumption when processing large amounts of data. Summary of the Invention
[0004] To address the aforementioned problems in existing technologies, this application provides a lightweight encrypted transmission method for inspection and testing data based on blockchain. By integrating lightweight encryption technology with blockchain distributed technology, it constructs a transmission channel for inspection and testing data that combines security, efficiency, traceability, and stability.
[0005] To achieve the above objectives, this application adopts the following technical solution: a lightweight encrypted transmission method for inspection and testing data based on blockchain, comprising the following steps: constructing a lightweight encrypted transmission framework for inspection and testing data based on blockchain, the encrypted transmission framework including: IoT devices, data holders, data accessors, edge computing nodes, attribute authorization agencies, and blockchain; performing system initialization operations, the system starts the System_Setup algorithm according to preset security parameters to complete the initialization process; encrypting and uploading inspection and testing data, after the data holder formulates a data access policy, the plaintext of the inspection and testing data is processed using an encryption algorithm based on the national cryptographic standard SM2, and a symmetric key for the national cryptographic standard SM4 symmetric encryption algorithm and a message authentication code (MAC) function key that can realize the verification of inspection and testing data are obtained from a specific bit string based on the key derivation function KDF. After data encryption, the data is uploaded to the IPFS distributed storage system, and the associated data is stored on the blockchain. Several attribute authorization agencies determine the index subsets corresponding to each attribute based on the data visitor's attribute set, and generate corresponding attribute keys. The inspection and testing data decryption process is executed. After receiving the encrypted attribute key, the data visitor decrypts it using a private key to obtain the attribute private key. Based on the attribute private key, a partial decryption key is determined and transmitted along with relevant parameters to the edge computing node to generate intermediate ciphertext. An encrypted transmission mechanism based on a multi-input-output model is constructed. The data input layer collects inspection and testing data through IoT devices and transmits it to the edge receiving node. The lightweight CP-ABE algorithm based on national cryptographic standards is used to encrypt data fragments, generate ciphertext fragments, and attach message authentication codes. The channel state is evaluated based on the rational transfer function matrix, and the optimal channel is selected to complete the ciphertext transmission.
[0006] The system initialization includes: the system running the System_Setup algorithm based on preset security parameters, selecting the elliptic curve and cyclic subgroup on the elliptic curve corresponding to the SM2 encryption algorithm, configuring cryptographic functions and user attribute sets that can realize bit string mapping of arbitrary length, integrating and generating system public parameters and distributing them to all users; the attribute authorization agency AA retrieves the system public parameters, executes the AA_Setup algorithm, selects random integers from the corresponding multiplication group, and combines the random integers selected for each attribute to generate the attribute master private key and master public key; and adopts a multi-attribute authorization agency decentralized collaborative management mode to realize the generation and operation and maintenance management of various attribute keys.
[0007] The encryption and uploading of inspection and testing data includes the following steps: First, a dot product operation is performed between a random integer and an elliptic curve basis point to generate corresponding intermediate parameters. Second, an association matrix is constructed based on the data access policy defined by the data owner, configuring the mapping relationship between matrix elements and user attributes. Two sets of random vectors are selected and their dot products are calculated with individual elements of the matrix to obtain policy association parameters. Third, the data access policy ciphertext is generated based on the policy association parameters, combined with the attribute public key. Fourth, a national cryptographic SM4 symmetric encryption key and a message authentication code (MAC) key are generated through a key derivation function. The plaintext of the inspection and testing data is encrypted using the SM4 symmetric encryption key to obtain the data ciphertext. A data authentication code is generated based on the MAC key. Fifth, the data access policy ciphertext and the data ciphertext are integrated to form the final ciphertext. The data owner uploads the final ciphertext to the IPFS distributed storage system to obtain a unique IPFS hash value, and then submits the IPFS hash value and the data access policy ciphertext together to the attribute authorization agency. The attribute authorization agency checks the user's identity through a smart contract, generates a unique identity identifier for compliant authorized users, and simultaneously submits the identity identifier, the corresponding IPFS hash value, and the data access policy ciphertext to the blockchain node to complete on-chain notarization.
[0008] The specific process for generating the corresponding attribute key is as follows: Several attribute authorization agencies determine the index subset corresponding to each attribute based on the attribute set of the data accessor, and generate the corresponding attribute key by combining the attribute-related master key component; The attribute authorization agencies encrypt the attribute key based on the data accessor's public key, and securely transmit the encrypted attribute key to the data accessor.
[0009] The specific process for generating intermediate ciphertext is as follows: After receiving encrypted data, the data user decrypts it using their own private key to obtain the corresponding attribute private key. Based on the attribute private key, encrypted random number, and user identity information, intermediate variables are calculated to determine a partial decryption key. This partial decryption key, along with relevant parameters, is then transmitted to the edge computing node. The matching between the data user's attribute set and the data access policy is verified. If the match is successful and the corresponding coefficient matching condition is met, the edge computing node calculates and generates intermediate ciphertext based on the intermediate variables and sends it back to the data user. The data user processes the intermediate ciphertext using their own private key and then processes the corresponding parameters using the Key Derivation Function (KDF) to generate a symmetric key for data decryption and a MAC key for integrity verification. The data user submits the corresponding IPFS hash value to the IPFS distributed storage system, retrieves the ciphertext of the inspection and testing data, decrypts the ciphertext using the symmetric key to obtain the plaintext data, and then uses the MAC key to verify the integrity of the decryption result. After the verification results are consistent, the successful decryption of the inspection and testing data is completed.
[0010] In the process of encrypted transmission of inspection and testing data, the multi-input-output model establishes a data transmission channel between the data sending end and the data access end through a rational transfer function matrix. The rational transfer function is constructed by taking the inspection and testing data transmission characteristics as the core parameters and combining the complex frequency domain input vector, complex frequency domain output vector, data transmission delay, data feedback delay and the number of data transmission channels of the multi-input-output model.
[0011] The data is fragmented and encrypted using the lightweight CP-ABE algorithm based on national cryptographic standards. The receiving end receives the ciphertext fragments through the selected optimal channel, reassembles the ciphertext fragments, performs decryption, and then verifies the data integrity through the message authentication code to restore the plaintext of the inspection data.
[0012] The blockchain consists of several blockchain nodes. Through a distributed ledger and consensus mechanism, it records the entire process of uploading and downloading inspection and testing data, ensuring the integrity of data transmission and full-chain traceability.
[0013] The beneficial effects of this application are as follows: This application provides a lightweight encrypted transmission method for inspection and testing data based on blockchain. It abandons the traditional centralized control architecture, deeply integrates lightweight encryption technology and blockchain distributed technology, eliminates single-point security risks caused by proxy nodes and aggregation nodes, and significantly improves the stability and anti-attack capability of the data transmission system. By optimizing the computational logic through lightweight encryption algorithms, it effectively reduces computing power and resource consumption and improves transmission efficiency while strengthening data security defenses, balancing security and efficiency. Leveraging the immutability and end-to-end traceability of blockchain, it achieves full-process traceability and evidence preservation for inspection and testing data transmission, facilitating data supervision and responsibility definition, and strengthening data credibility. The method is adaptable to large-scale inspection and testing data transmission scenarios, considers deployment economy, and, combined with a smart contract automated verification mechanism, ensures data transmission integrity without manual intervention, creating a secure, reliable, efficient, convenient, and economical inspection and testing data transmission channel that meets the industry's dual needs for data security and efficient transmission. Attached Figure Description
[0014] Figure 1 is a flowchart illustrating the lightweight encrypted transmission method for inspection and testing data based on blockchain according to this application; Figure 2 is a schematic diagram illustrating the framework for lightweight encrypted transmission of inspection and testing data based on blockchain; Figure 3 is a schematic diagram illustrating the structure of the encrypted transmission mechanism for inspection and testing data based on a multi-input-output model; Figure 4 is a schematic diagram illustrating the comprehensive performance comparison and analysis of encrypted transmission of inspection and testing data; Figure 5 is a schematic diagram illustrating the performance comparison of data transmission under different methods. Detailed Implementation
[0015] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.
[0016] It should be understood that although the terms "first," "second," "third," etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0017] In the description of this application, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0018] Unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0019] Figure 1 shows a lightweight encrypted transmission method for inspection and testing data based on blockchain, which includes the following steps: S1, constructing a lightweight encrypted transmission framework for inspection and testing data based on blockchain. The encrypted transmission framework includes: IoT devices, data holders, data visitors, edge computing nodes, attribute authorization agencies, and blockchain.
[0020] Inspection and testing data often face problems such as tampering, lack of effective traceability mechanisms, and insufficient transmission security during transmission, making it difficult to guarantee the authenticity and reliability of the data. Blockchain technology, with its core characteristics of decentralization, immutability, traceability, and transparency, provides the possibility of building a secure and reliable inspection and testing data transmission environment. Once the data is on the chain, it can effectively prevent malicious modification, and all operation records can be checked, ensuring that inspection and testing data can be transferred safely, efficiently, and reliably. The lightweight encrypted transmission framework for inspection and testing data based on blockchain is shown in Figure 2. The main participating entities and their functions are as follows: (1) Internet of Things (IoT) devices, as front-end device nodes, use built-in diverse sensors and data sensing capabilities to acquire inspection and testing data in real time, and have the characteristics of limited hardware resources.
[0021] (2) The Data Holder (DO) is the legitimate owner of the inspection and testing data. By formulating data access policies, malicious users are identified, ensuring that legitimate users who meet the authentication requirements can obtain the plaintext of the inspection and testing data. With the assistance of edge computing nodes, the lightweight CP-ABE algorithm based on national cryptographic standards is used to encrypt the inspection and testing data collected by IoT devices and the data access policies. The encrypted inspection and testing data is transmitted to the InterPlanetary File System (IPFS) for storage, and a unique hash value is generated. This hash value, along with the encrypted access policies, is provided as a transaction to the attribute authorization agency, which then broadcasts the transaction record to the blockchain.
[0022] (3) Data accessor (DU) is a third party that obtains and uses inspection and testing data. It submits a data access application to the attribute authorization agency. The DU that has passed the identity verification can use the edge computing node to complete the decryption and download of the encrypted inspection and testing data.
[0023] (4) Edge computing nodes (FN) can not only assist DO in completing the task of encrypting inspection and testing data, but also provide support when DU obtains intermediate ciphertext, thereby effectively avoiding the performance bottleneck caused by limited equipment resources.
[0024] (5) Attribute Authorization Authority (AA) is responsible for verifying user identity, generating and managing user attribute keys, and publishing sub-attribute public keys on the blockchain so that other entities can query and use them when verifying attributes.
[0025] (6) Blockchain (BC) consists of several blockchain nodes. It uses distributed ledger and consensus mechanism to record the upload and download records of inspection and testing data to ensure the integrity and traceability of the data.
[0026] S2. Execute system initialization operations. The system starts the System_Setup algorithm according to the preset security parameters to complete the initialization process.
[0027] To achieve lightweight encrypted transmission of inspection and testing data, the system relies on preset security parameters. The System_Setup algorithm is started to complete the initialization process. The elliptic curve of the SM2 encryption algorithm over a specific finite field is defined as follows. Determine its previous cyclic subgroup as The number of elements in the group is determined by the number of large prime numbers. express. As a subgroup of this cycle A generator (base point) is used to generate public-private key pairs. Simultaneously, cryptographic functions are defined. It can convert bit strings of arbitrary length. Securely map to the model integers Used for operations such as identity mapping and hashing. (Settings) This represents the user attribute set, containing all available attribute tags for the user. Finally, all parameters are integrated into system-public parameters. And send it to all users.
[0028] Attribute Authorization Authority (AA) obtains publicly available parameters generated during the system initialization phase. Then, the AA_Setup algorithm is executed to generate and manage attribute-related keys. The attribute authorization authority AA, from the model... multiplication group Choose any integer At the same time, it is a set of attributes. For each attribute `attr`, arbitrarily select an integer. Generate the master private key based on it. public key Multiple attribute authorization agencies (AAs) are established to be responsible for the generation and management of keys for different attributes. By having multiple attribute authorization agencies (AAs) jointly manage a single attribute, the security and reliability of access to inspection and testing data are improved.
[0029] S3. Encryption and Uploading of Inspection and Testing Data: After the data holder formulates the data access strategy, the plaintext of the inspection and testing data is processed using the encryption algorithm based on the national cryptographic SM2. The symmetric key for the national cryptographic SM4 symmetric encryption algorithm is obtained from a specific bit string based on the key derivation function KDF, as well as the message authentication code MAC function key that can realize the verification of inspection and testing data. After the data encryption is completed, it is uploaded to the IPFS distributed storage system, and the associated data is stored on the chain. The main process is as follows: (1) Randomly select an integer Compare it with the points on the elliptic curve Perform dot product operation to generate The calculation formula is: (1) (2) Through This represents the data access strategy specified by DO, where the matrix... The dimension is These correspond to the number of layers and the number of attributes in the data access strategy, respectively. This is a mapping function, its function is to map the matrix to the nth matrix. Elements and Each attribute `attr` is mapped one-to-one. Two vectors are arbitrarily selected. , , , All The random integers in the matrix. The two vectors and the matrix are calculated using the following formulas respectively. No. The dot product of the row elements yields: (2) (3) Calculate the ciphertext related to the data access policy using the following formulas: (3) Wherein: the public key related to the attribute is represented as .
[0030] (4) Using the key derivation function KDF, it is possible to obtain... Two keys are generated, and the calculation formula is as follows: (4) Among them: The key for the SM4 symmetric encryption algorithm (China's national cryptographic standard); This is the key for the Message Authentication Code (MAC) function. The generated key length is expressed as... .
[0031] (5) Use As the key, the plaintext verification and testing data is encrypted using the national standard SM4 symmetric encryption algorithm. Receive ciphertext ,use As the key, the authentication code for verifying the detection data is calculated using the Message Authentication Code (MAC) function, resulting in the ciphertext. The calculation formula is: (5) (6) After the data access policy is encrypted, ciphertext is generated. Plain text of inspection and testing data After encryption, the ciphertext is obtained. The final ciphertext is obtained by combining the two. .
[0032] After DO transmits the encrypted test data to IPFS, it generates a unique IPFS hash value. ; and cipher it with the data access policy. After being submitted to the attribute authorization agency AA, the attribute authorization agency AA checks the user DU's identity through a smart contract and generates a unique identifier for the authorized user. and will Submit to the blockchain node.
[0033] S4. Several attribute authorization agencies determine the index subset corresponding to each attribute based on the data visitor attribute set, and generate the corresponding attribute key: Several attribute authorization agencies AA determine the index subset corresponding to each attribute based on the DU attribute set. Determine the index subset corresponding to each attribute The attribute key is generated by the following formula. : (7) Among them: To and Attribute-related master key components.
[0034] Attribute Authorization Authority (AA) uses DU public key encryption And then securely transmit the encrypted text to DU.
[0035] S5. Execute the inspection and testing data decryption process. After receiving the encrypted attribute key, the data accessor decrypts it using the private key to obtain the attribute private key. Based on the attribute private key, a partial decryption key is determined and transmitted to the edge computing node along with relevant parameters to generate intermediate ciphertext.
[0036] DU received the encrypted Then, using its private key Decrypt it to obtain its attribute private key. Then, the partial decryption key is determined using formula (8). , and The data is transmitted together to the edge computing nodes to generate intermediate ciphertext. To improve decryption efficiency, the specific process is as follows: (8) (1) Use the formula to obtain the intermediate variable that combines the attribute key, the encrypted random number and the user identity information. The calculation formula is: (9) (2) When DU attribute set When matching data access strategies, if there exists a set of coefficients make If it is established, then , .
[0037] (3) Calculate the intermediate ciphertext using the following formula , : (10) (4) Edge computing nodes are partially decrypted Determine the intermediate ciphertext Then, it is transmitted to DU for subsequent decryption of inspection and testing data.
[0038] DU via private key Process the intermediate ciphertext to obtain Then, it is processed through the key derivation function KDF. Generate a symmetric key for decryption. and MAC key used for integrity verification The calculation formula is: (11) DU will be associated with the IPFS hash value corresponding to the encrypted test data. Submitted to IPFS, receiving encrypted inspection and testing data. Through symmetric keys right Decrypt to obtain Using the key Decryption results Perform integrity verification, that is , and Perform a comparison, if This indicates that the decrypted plaintext inspection and testing data has been obtained. Compared with the original data Consistent results indicate that the test data has been successfully decrypted.
[0039] S6. Construct an encrypted transmission mechanism based on a multi-input-output model. The data input layer collects inspection and testing data through IoT devices and transmits it to the edge receiving node. The lightweight CP-ABE algorithm based on national cryptography is used to encrypt data fragments, generate ciphertext fragments, and attach message authentication codes. The channel state is evaluated based on the rational transfer function matrix, and the optimal channel is selected to complete the ciphertext transmission.
[0040] To ensure the compliance and security of inspection and testing data transmission, a multi-input-output (MIO) model is used to achieve end-to-end data transmission from acquisition and encrypted storage to authorized access. The MIO-based encrypted transmission mechanism for inspection and testing data is shown in Figure 3. The data input layer P acquires inspection and testing data through IoT devices and transmits it to the edge receiving nodes in the encrypted transmission layer C(S). The data is then fragmented and encrypted using the lightweight CP-ABE algorithm based on Chinese national cryptographic standards, generating ciphertext fragments and attaching a message authentication code. The channel selector G(S) dynamically evaluates the channel state based on the favorable transfer function matrix and selects the optimal transmission channel to transmit the fragmented ciphertext. The receiving end receives the fragmented ciphertext from the selected channel, decrypts it after reassembly, and uses MAC to verify data integrity, restoring the plaintext inspection and testing data.
[0041] During the encrypted transmission of inspection and testing data, the multi-input / output model establishes a data transmission channel between the data sender and data receiver using a rational transfer function matrix. The formula for calculating the transfer function is: (12) Where: the characteristic quantity of the test and detection data transmission is The input vector of the data transmitted in the multiple input-output model is represented in the complex frequency domain as follows: The output vector is represented in the complex frequency domain as: Data transmission and feedback delays are respectively , The number of data transmission channels is expressed as .
[0042] Sure Then, by evaluating the channel at different frequencies Based on the dynamic characteristics of the data, the optimal channel (good stability, low latency, and sufficient bandwidth) is selected to carry lightweight encrypted transmission of inspection and testing data, thereby optimizing transmission efficiency and reliability.
[0043] The specific implementation is as follows: A lightweight encrypted transmission experiment of inspection and testing data was conducted in the experimental environment shown in Figure 2. The key parameters used in the experiment are shown in Table 1. The experimental dataset contains 29,000 inspection and testing data, involving equipment temperature, voltage, current, etc. The research method was applied to the lightweight encrypted transmission of inspection and testing data. By analyzing the data encryption and transmission effects, its practical application performance was verified.
[0044] Table 1 Key experimental parameters To verify the lightweight advantage of the research method, it was compared with the data security transmission method based on proxy re-encryption and the encrypted transmission method based on blockchain. The differences in computational cost of the three methods in verifying data encryption and decryption are shown in Table 2.
[0045] Table 2 Comparison of lightweight data encryption and decryption methods. In Table 2, U, M, and S represent the total number of all attributes, the number of data access strategies, and the total number of data visitor attributes, respectively; TG represents the computational cost of performing one elliptic curve scalar multiplication. During the initialization phase, the computational costs of the three methods are consistent. During the encryption and decryption phases, the research method, by utilizing lightweight cryptographic algorithms and combining them with the processing capabilities of edge computing nodes, significantly optimizes the computational process, resulting in a computational cost far lower than the two comparative methods. This fully demonstrates the effectiveness and lightweight advantages of the research method in reducing computational overhead.
[0046] The key sizes were set to 64, 128, 256, 512, and 1024. By comparing the security strength and encryption / decryption time of the three methods, the overall performance of different methods in the encrypted transmission of inspection and testing data was analyzed. The experimental results are shown in Figure 4.
[0047] Analysis of Figure 4 reveals that when using the research method for lightweight encrypted transmission of test data, although both security strength and encryption / decryption time increase with increasing key size, the rate of increase is relatively gradual. This indicates that while the research method provides higher security, its computational complexity also increases. In contrast, the comparative method shows a much faster increase in both of these metrics. With the same key size, the research method significantly outperforms the comparative method in both security strength and encryption / decryption time, fully demonstrating its comprehensive performance advantage.
[0048] Figure 5 shows the comparison of bit error rate and packet loss rate of various methods in lightweight encrypted transmission of inspection and testing data. Analysis of Figure 5 reveals that the researched method demonstrates superior performance in lightweight encrypted transmission of inspection and testing data, with a bit error rate of 0.11 and a packet loss rate of 0.165, both significantly lower than the comparative methods. This indicates that the researched method effectively improves the stability and reliability of data transmission while ensuring data security, reducing errors and data loss during transmission, and providing a more efficient and reliable solution for lightweight encrypted transmission of inspection and testing data.
[0049] User A is designated as an authorized user with a legitimate identity, while user B is designated as a malicious user. Both users A and B are required to obtain equipment temperature, vibration frequency, voltage, and current testing data in industrial production. By analyzing the data encryption and decryption results, the practical application performance of the research method is verified. The experimental results are shown in Table 3.
[0050] Table 3 Analysis of the Encryption and Decryption Results of Inspection and Testing Data Analysis of Table 3 shows that the research method ensures data security by encrypting the inspection and testing data into an unreadable sequence of random characters. Authorized user A, using the correct key, successfully decrypted the original inspection and testing data, and the decrypted result was completely consistent with the plaintext data, verifying the correctness of the decryption. However, malicious user B, unable to obtain the correct key, resulted in a decryption result that was still random characters. This fully demonstrates that the research method effectively resists unauthorized access and ensures data security.
[0051] In summary, the proposed lightweight encrypted transmission method for inspection and testing data based on blockchain utilizes the CP-ABE encryption algorithm based on Chinese national cryptographic standards to achieve lightweight encryption of inspection and testing data. It combines edge computing nodes to improve processing efficiency and leverages a multi-input / output model to optimize channel selection. While ensuring secure and reliable data transmission, it also improves transmission efficiency and reliability. Blockchain technology effectively addresses the security, traceability, and performance bottlenecks in inspection and testing data transmission. Experimental results demonstrate that this scheme significantly improves transmission efficiency while maintaining data security, reducing computational overhead by 30%, shortening encryption and decryption time by 40%, and achieving lower bit error rate (0.11) and packet loss rate (0.165) compared to existing methods. This provides a practical solution for lightweight secure transmission of inspection and testing data. Future research can explore more efficient encryption algorithms and blockchain optimization technologies to adapt to more complex and dynamic inspection and testing data transmission scenarios, promoting technological innovation and application development in this field.
[0052] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A lightweight encrypted transmission method for inspection and testing data based on blockchain, characterized in that, Includes the following steps: A lightweight encrypted transmission framework for inspection and testing data based on blockchain is constructed. This framework includes: IoT devices, data holders, data accessors, edge computing nodes, attribute authorization agencies, and a blockchain. System initialization is performed, with the system initiating the System_Setup algorithm based on preset security parameters to complete initialization. Inspection and testing data encryption and uploading are then performed. After the data holder formulates a data access policy, the plaintext inspection and testing data is processed using an encryption algorithm based on the national standard SM2. A symmetric key for the national standard SM4 symmetric encryption algorithm and a message authentication code (MAC) function key for verifying the inspection and testing data are obtained from a specific bit string using the key derivation function (KDF). After data encryption, the data is uploaded to the IPFS distributed storage system, and associated data is also linked. On-chain evidence storage; several attribute authorization agencies determine the index subset corresponding to each attribute based on the attribute set of the data visitor, and generate corresponding attribute keys; execute the inspection and testing data decryption process, after the data visitor receives the encrypted attribute key, it decrypts it with its private key to obtain the attribute private key; based on the attribute private key, a partial decryption key is determined and transmitted along with relevant parameters to the edge computing node to generate intermediate ciphertext; construct an encrypted transmission mechanism based on a multi-input-output model, the data input layer collects inspection and testing data through IoT devices and transmits it to the edge receiving node, uses the lightweight CP-ABE algorithm based on national cryptography to encrypt data fragments, generates ciphertext fragments and attaches message authentication codes; evaluate the channel state based on the rational transfer function matrix, select the optimal channel to complete the ciphertext transmission.
2. The lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, The system initialization includes: the system running the System_Setup algorithm based on preset security parameters, selecting the elliptic curve and cyclic subgroup on the elliptic curve corresponding to the SM2 encryption algorithm, configuring cryptographic functions and user attribute sets that can realize bit string mapping of arbitrary length, integrating and generating system public parameters and distributing them to all users; the attribute authorization agency AA retrieves the system public parameters, executes the AA_Setup algorithm, selects random integers from the corresponding multiplication group, and combines the random integers selected for each attribute to generate attribute master private keys and master public keys; a multi-attribute authorization agency decentralized collaborative management mode is adopted to realize the generation and operation and maintenance management of various attribute keys.
3. The lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, The encryption and uploading of the inspection and testing data includes the following steps: performing a dot product operation between a random integer and the base point of an elliptic curve to generate corresponding intermediate parameters; constructing an association matrix based on the data access policy defined by the data owner, configuring the mapping relationship between matrix elements and user attributes, selecting two sets of random vectors to calculate the dot product with the elements of a single row of the matrix respectively, and obtaining policy association parameters; combining the attribute public key, calculating and generating the ciphertext of the data access policy based on the policy association parameters; generating a national cryptographic SM4 symmetric encryption key and a message authentication code (MAC) key through a key derivation function, and encrypting the plaintext of the inspection and testing data based on the SM4 symmetric encryption key to obtain the data. The encrypted data is used to calculate a data authentication code based on the MAC key. The encrypted data access policy and the encrypted data are then integrated to form the final encrypted data. The data owner uploads the final encrypted data to the IPFS distributed storage system to obtain a unique IPFS hash value. The IPFS hash value and the encrypted data access policy are then submitted to the attribute authorization agency. The attribute authorization agency checks the user's identity through a smart contract, generates a unique identifier for compliant authorized users, and simultaneously submits the identifier, the corresponding IPFS hash value, and the encrypted data access policy to the blockchain node to complete on-chain notarization.
4. The lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, The specific process for generating the corresponding attribute key is as follows: several attribute authorization agencies determine the index subset corresponding to each attribute based on the attribute set of the data accessor, and generate the corresponding attribute key by combining the attribute-related master key component; The attribute authorization authority encrypts the attribute key based on the data accessor's public key and securely transmits the encrypted attribute key to the data accessor.
5. A lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, The specific process for generating the intermediate ciphertext is as follows: After receiving encrypted data, the data user decrypts the data using their own private key to obtain the corresponding attribute private key. Based on the attribute private key, encrypted random number, and user identity information, intermediate variables are calculated to determine a partial decryption key. This partial decryption key, along with relevant parameters, is then transmitted to the edge computing node. The matching between the data user's attribute set and the data access policy is verified. If the match is successful and the corresponding coefficient matching condition is met, the edge computing node calculates and generates intermediate ciphertext based on the intermediate variables and sends it back to the data user. The data user processes the intermediate ciphertext using their own private key and then processes the corresponding parameters using the Key Derivation Function (KDF) to generate a symmetric key for data decryption and a MAC key for integrity verification. The data user submits the corresponding IPFS hash value to the IPFS distributed storage system, retrieves the ciphertext for inspection and testing, decrypts the ciphertext using the symmetric key to obtain the plaintext data, and then uses the MAC key to verify the integrity of the decryption result. After confirming that the verification results are consistent, the successful decryption of the inspection and testing data is completed.
6. The lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, During the encrypted transmission of the inspection and testing data, the multi-input-output model establishes a data transmission channel between the data sending end and the data access end through a rational transfer function matrix. The rational transfer function is constructed by taking the inspection and testing data transmission characteristics as the core parameters and combining the complex frequency domain input vector, complex frequency domain output vector, data transmission delay, data feedback delay, and the number of data transmission channels of the multi-input-output model.
7. The lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, The data is encrypted using the lightweight CP-ABE algorithm based on national cryptographic standards. The receiving end receives the ciphertext fragments through the selected optimal channel, reassembles the ciphertext fragments, performs decryption, and then verifies the data integrity through the message authentication code to restore the plaintext of the inspection data.
8. A lightweight encrypted transmission method for inspection and testing data based on blockchain according to claim 1, characterized in that, The blockchain consists of several blockchain nodes. Through a distributed ledger and consensus mechanism, it records the entire process of uploading and downloading inspection and testing data, ensuring the integrity of data transmission and full-chain traceability.