# Exploiting Blockchain Technology for Enhancing Digital Twins' Security and Transparency
## 4 Experimental Results
### Security Analysis  
This section provides an analysis of the tests conducted to evaluate the security integrity of the proposed system. The examination focused on the security robustness of smart contracts and supporting stub components, analyzing their functionalities within the framework of established security requirements. Multiple tests were executed, and detailed results were systematically recorded through logging outputs to validate the operational logic and security measures implemented. The smart contracts serve as the main mechanism for enforcing security policies in the system. Unauthorized transactions involving actors different from those designed for the communications can potentially lead to the malfunctioning of the system. Specifically, the manager contract is crucial in securing the system, acting as a gateway for managing data hashes and facilitating secure communication protocols. Figure 5: Sequence diagram of the communication steps in a data transmission. To assess the access control mechanisms, two separate account addresses were instantiated for testing, one with administrative privileges and the other without. Both accounts attempted to access restricted functions within the manager contract to update the list of authorized communications. The transaction logs from these attempts provided insights into the system's response to authorized and unauthorized access requests. Results showed that transactions initiated by the authorized administrative account were processed successfully across all tested operations, as anticipated, while attempts initiated by the unauthorized account were appropriately denied, consistent with the system's communication protocols and the access level assigned to the secondary address. This outcome validates that access control mechanisms effectively restrict administrative functionalities, aligning with the security objectives of the system. Following the verification of the secure access to administrative functionalities within the contracts, the next phase of analysis focused on evaluating the communication dynamics between data-sending actors and the digital twin system. This specific test was designed to examine the system's resilience against unauthorized communication attempts that could potentially alter the data representation within the digital environment. Similarly to the access control testing performed on the smart contract's administrative functions, this test assessed the system's response by initiating transactions from two distinct addresses: one authorized as a valid data sender and another unregistered. The anticipated outcome was an accepted transaction for the authorized address and a rejection for the unauthorized one. For this phase of testing, access restrictions provided by the backbone blockchain were temporarily disabled to enable an isolated assessment of the management component's behavior in handling secure communications. Without this adjustment, the network validators would automatically reject any transaction originating from a sender lacking a registered address, preventing an authorized update of the digital twin's information. This approach allowed for a focused analysis of the system's internal security mechanisms independent of external blockchain-based access controls. Also, in this case, the results of that testing phase were favorable, aligning with the expected behavior of the manager contract's security protocols. When data transmissions were initiated from both addresses, the authorized address successfully completed a transaction recorded by a blockchain node, indicating that the manager contract's internal security systems approved the communication. On the other hand, for the second address, a revert message was recorded by the blockchain's nodes assessing the invalid nature of the communication route followed.