# Exploiting Blockchain Technology for Enhancing Digital Twins' Security and Transparency
## 4 Experimental Results
### Stub Testing  
In order to guarantee the interoperability between the hosting system component and the blockchain's stub integrated into each of the actors involved, we now analyze the steps followed by the security measures introduced. Moreover, in the last part of this discussion, we focus on the security aspects regarding the consumption of invalidated data from the digital twin's system. Following a canonical path of communication between the system's actors, after a channel initialization, a sender started to communicate with the digital twin while sending data hashes to the storing contract through the manager gateway. The path followed by the signed transactions was recorded by the validating nodes, which traced the steps followed by the system in the update of the digital twin's information. Within the provided information, each functional aspect of the associated sub-module could be identified, enriched with specific information regarding the processed data. The hash values corresponding to the generated JSON files were recorded as input parameters, followed by the receipts associated with the submissions of hashes to the blockchain. While data were received from the direct communication channel connecting the sender module and the digital twin, hashes were required from the blockchain's smart contract to be compared with the one obtained locally. The collected logs confirmed that the data transmission by the auxiliary sender sub-module were successfully received by the digital twin and were ready to be subsequently processed by the Hosting system. As the last step of the message validation life cycle, the received information was correctly validated by the sub-system, and the digital twin software proceeded to update the information of the model, updating the underlying model. This fundamental test allowed us to assert the correct behavior of the system under correct conditions, though it left open important questions regarding the security protocols put in place. In order to evaluate the security requirements of the communication process, we carried out a behavioral analysis using as an example a transaction unknown to the validation system forwarded to the digital twin system only by standard communication means. The expected results described by the transaction life cycle should imply a discarded transaction from the system. The following test simulated the concurrent transmission of both unconfirmed data and confirmed data to the digital twin system. The purpose of that test was mainly to evaluate the system's robustness in preventing interference by a potential malicious actor attempting to exploit the primary transmission channel to compromise the digital twin's management mechanism. It was expected that the receiver system would maintain its intended functionality by disregarding any unconfirmed messages, thereby continuing to receive an additional hash value and validate subsequent incoming data. In the specified test scenario, we configured two kinds of sender actors: a fraudulent source only communicating with the digital twin through direct messages, and a canonical source acting as intended for the system. Both actors involved proceeded to send syntactically correct messages to the digital twin's system, and the response of the latter was registered through specific logging messages in the stub. Through this analysis, we were able to assert the formulated hypothesis, obtaining evidence of the predicted behavior. Any fraudulent transmission attempt resulted in a mismatch between hash values received from the sources, leading the receiver module to reject the received data for the digital twin update. Following this rejection, canonical system operation resumed, allowing the validation cycle to continue as intended without causing service interruptions.