# Trusted Third Party Application in Durable Medium e-Service
## 4 Experimental Verification of the Proposed e-Service--A Case Study
Next, using links to the documents, the ISP downloads documents from the IPFS network and decrypts them using encrypted AES keys. In the next stage, the ISP makes these documents available to his clients (in decrypted form so that customers can easily read them). After reading the document, each customer decides to accept or reject it. The client's decision is forwarded to the ISP, which forwards it further to the TTP (along with the customer ID and hash of the document). Then, the TTP places each decision (treated as an operation on the document and stored using the OID field) along with the customer identifier (CID) and document hash (DID) in the blockchain as a new transaction in the block. Ultimately, after each of the 10,000 customers makes a decision, 20,000 new transactions will appear in the blockchain (10,000 transactions with documents added by the ISP and 10,000 transactions with decisions of 10,000 customers regarding these documents), as shown in Figure 4. This figure presents a summary of the number of transactions after execution of the test scenario, and is recorded using Sirato Explorer (blockchain monitoring tool). As can be observed in Figure 4, there are two more transactions. This is because adding a smart contract is itself registered as a new transaction. So, there is one more transaction for a smart contract regarding adding documents, and one more for a smart contract regarding adding customers' decisions. Figure 5 presents a selected block (no. 610) from the blockchain recorded using Alethio Lite Explorer--a blockchain monitoring tool. This block contains, among others: the information about the number of the block (610), block approval status (the \"Confirmed\" green message means that the block was fully approved by nodes responsible for the consensus algorithm), hashes of the current block and parent block, size of the block (23,262 bytes), number of included transactions (63), information about the node, which confirmed the block (\"mined by\" field), gas limit, the amount of used gas (<1%), and difficulty in mining block (1 h). The second case study test scenario presents a situation in which the ISP introduces a new document, but is common for all clients (e.g., new regulations, price list, etc.). This document must be agreed upon with each of the 10,000 ISP customers. In the first step, the ISP sends the document and a list of 10,000 identifiers of the ISP customers to whom this document applies to the TTP. Next, the TTP electronically signs the document with its digital signature and generates a symmetric 256-bit key using the AES-256 algorithm. The document is encrypted using this AES symmetric key, and the AES key is encrypted using an RSA 2048-bit ISP public key. It is worth noting that the generation of the AES key is performed in the secure HSM hardware module. Then the TTP sends the encrypted (signed) document to the IPFS server, where a hash using the SHA-256 algorithm is generated. Next, the document is stored in the IPFS network and a link to the document is generated. Then, the link together with the hash of the document is sent back to the TTP, and the TTP adds a new transaction in the blockchain. The transaction contains a hash of the document (DID field in the blockchain structure), the identifier of the entity that sent the document (an identifier of the ISP stored in the CID field), and the identifier of the document addition operation (OID field). The document itself is not saved in the blockchain, but it along with its hash is stored in the IPFS network. Figure 4: Summary of the number of transactions after execution of the first test scenario. Figure 5: Detailed information about one selected block from the blockchain. In the next step, the hash of the document, a link to the document in IPFS, and the encrypted symmetric AES key are sent back to the ISP. Then, the ISP decrypts the AES key using its private RSA key. Next, using the link, the ISP makes the document available to all clients. After reading the document, each of the customers decides to accept or reject it.