# Secure Delivery Scheme of Common Data Model for Decentralized Cloud Platforms
## Materials and Methods
### Methods for Adapting to CDM Model
#### 2.2.4 CDM Separate Block Encryption/Decryption Algorithm  
Both an asymmetric key and a symmetric key are valid on the blockchain. The symmetric key is applied for CDM data encryption according to performance characteristics of encryption and decryption of Cloud CDM service and its application. The symmetric protocol is used to ensure data confidentiality with CDM data resilience. When the multi-channel method is used, a large amount of data transmission between devices is distributed to other channels, thus increasing the efficiency of communication and security and reducing the occurrence of information exposures problems that may occur during the data transmission process. Figure 4 shows how the encrypted CDM between \(\text{Node}_{\text{A}}\) and \(\text{Node}_{\text{B}}\) in SC-CDM is shared. In order for the CDM data owner to transmit CDM data, each of the original CDM data are divided into two pieces, and then the divided parts are encrypted, using a symmetric key and a random Initialization Vector (IV).  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Component** & **CDM Blockchain** \\ \hline
1 & Digital asset & CDM with generated digest \\ \hline
2 & Participant & CDM provider \\  & & CDM consumer \\  & & Service broker \\ \hline
3 & Transaction & Write the digest of CDM \\  & & Read the signed CDM \\  & & Read the digest associated with CDM \\ \hline
4 & Access control & Read a public key by CDM provider \\  & & Read a public key by CDM consumer \\  & & Write a public key by Service broker \\ \hline
5 & ID management & X.509 public/private key \\ \hline \hline \end{tabular}
\end{table}
Table 1: The basic definition of the components of CDM blockchain.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **The Baseline CDM Model** & **The Proposed Secure-Cloud CDM Model** \\  & & **(SC-CDM)** \\ \hline Fault tolerance & Limitation of single point of failure & High availability with Replication \\ \hline Data Sharing & High cost of sharing large CDM data & Low cost of data sharing using P2P \\  & & repository and distributed ledger \\ \hline Privacy & The exposure of CDM data ownership & Enhanced secure DID ownership \\ \hline Data integrity & Vulnerability of CDM data integrity & Ensuring data integrity with cryptography \\ \hline DID = Decentralized Identifier; P2P = peer-to-peer. & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of qualitative factors in the CDM model.  
The encryption scheme is described by the key-generation algorithm (Gen), having a key-space (K), the encryption (Enc), and decryption (Dec) algorithms, with the data-space (D).  
* Gen generates a random key (32 byte) and an IV (16 byte);
* Enc/Dec is based on Advanced Encryption Standard (AES) and Cipher Block Chaining with IV;
* D: CDM derived by EMR.  
It is used to ensure data confidentiality and integrity of SC-CDM. Every CDM has different key and IV to increase the security by exploring randomness. A blockchain is used for exchanging information of encryption and decryption of CDM between a CDM producer and a CDM consumer through transaction.  
The transaction has four components:  
* IV;
* Shared key (generated by symmetric key protocol);
* Two hash values generated by SHA-256.  
The IV adds randomness at the start point of the encryption process of chained block encryption mod, and the random IV creates key file for each encrypted file. A cipher block is generated from encrypting a XOR output of the previous cipher block and forwards plaintext block.  
In Cipher-Block Chaining (CBC) mode, the previous cipher block is given as input to the next encryption algorithm after XOR with original plaintext block [33]. If each key is only ever used to encrypt a single CDM, one can get away with using a fixed IV. This random IV ensures that each CDM encrypts differently, such that seeing multiple CDM encrypted with the same key does not give the attacker any more information than just seeing a single long message.