# Proxy Re-Encryption Scheme for Decentralized Storage Networks
## 6 Evaluation  
### Remove Access or Corrupted Ciphertext  
Thus far, our scheme covers the encryption and decryption of data and shares the data with the public key of another user. We can either choose to generate a \(rk_{A\to B}\) or \(D_{B}\), and it is possible to generate a new ciphertext by replacing \(D_{B}\) with \(D_{A}\) or reuse \(c_{A}\) by placing \(D_{B}\) in a separate file.  
\[c_{A}\xrightarrow{ReEnc}c_{B}\]  
How about removing the access permission of a user? The concept of forwarding secrecy [27] was introduced in cryptography. Strictly, since a message is sent to another one, it is not a secret anymore, as the content could be copied and shared again. It is impossible to revoke a message or erase information with cryptography. However, in practice, people come and leave the organization, and granting or revoking data access permission is the daily operation. If a user intends to expose the critical information \(g_{ECC}^{f}\) to the public, the cipher \(c\) is no longer a secret. In those cases, the cryptography method can not ensure security in practice. The only choice is to remove the existing ciphertext to prevent further information leaking.  
Figure 5: Time cost for our PRE scheme and WDLC10 encryption for every 100 k times of encryption of 64 bytes data on MacBook 1.3 GHz Intel Core i5.  
Figure 6: Time cost for our PRE scheme and WDLC10 encryption for every 1000 times of encryption of 64 bytes data on a 1 st generation of Raspberry Pi model B 700 Hz.  
We provide another ciphertext transfer operation. It is not a part of our scheme but it is useful when transferring the ciphertext into a new one when the message is leaking, and this operation could be applied after any data access permission is revoked.  
Transfer operation \(c_{A}\xrightarrow{Transfer}c^{\prime}_{A}\), where \(c^{\prime}_{A}=\langle D^{\prime}_{A},r^{\prime},E,F^{\prime},V^{\prime},S^{ \prime}\rangle\):  
\[D^{\prime}_{A}=\left(pk_{A}\right)^{d^{\prime}},d^{\prime}=H_{1}(sk_{A},r^{ \prime}),r^{\prime}\leftarrow\mathbb{Z}_{p}, \tag{47}\]  
\[\begin{split} F^{\prime}&=F\oplus re\\ &=F\oplus H_{3}(g^{d},E)\oplus H_{3}(g^{d^{\prime}},E)\\ &=H_{3}(g^{d},E)\oplus(m||w)\oplus H_{3}(g^{d},E)\oplus H_{3}(g^ {d^{\prime}},E)\\ &=H_{3}(g^{d^{\prime}},E)\oplus(m||w),\\ &\qquad\qquad V^{\prime}=g^{v^{\prime}},v^{\prime}\leftarrow \mathbb{Z}_{p},\end{split} \tag{49}\]  
\[S^{\prime}=g^{s^{\prime}},s^{\prime}=v^{\prime}+sk_{A}\cdot r^{\prime}. \tag{50}\]  
The ciphertext transfering key \(re\) is defined:  
\[re=H_{3}(g^{d},E)\oplus H_{3}(g^{d^{\prime}},E). \tag{51}\]  
It is safe to send the transfer key to the proxy and transfer the existing ciphertext into a new one. By this operation, the previous ciphertext is discarded, and the new permission of access should be regenerated.  
The concept above is also helpful in blockchain storage content for key renewal. Periodically changing the secret key is recommended to avoid potential confidential key leakage. A finance blockchain such as Bitcoin can create another secret/public key pair and transfer existing coin assets to the new wallet address. The signature is the evidence of a coin transaction. As opposed to this, the storage blockchain uses a secret key to decrypt. Losing a key is losing the data unless an algorithm can transfer the old ciphertext to the new one under the new key. Our PRE scheme is suitable for this scenario.