# Secure Outsourced Blockchain-Based Medical Data Sharing System Using Proxy Re-Encryption +
## 3 Preliminaries
### Proxy Re-Encryption  
PRE is a scheme that enables a proxy to transform a ciphertext that can be decrypted by one user into another ciphertext that can be decrypted by another user without decryption. Since its introduction by [PERSON] et al. in 1998 [26], various versions of the PRE have been proposed. PRE is based on a public key cryptography system; as such, the encryption and decryption keys are dissimilar. After encryption, the data can be re-encrypted without decryption by a proxy; hence, the plaintext is not revealed during the PRE, and the confidentiality of the ciphertext is preserved. The basic concept of the PRE scheme is illustrated in Figure 2.  
Let \(pk_{A}\) and \(sk_{A}\) be [PERSON]'s encryption and decryption keys, respectively, and let \(pk_{B}\) and \(sk_{B}\) be the encryption and decryption keys for [PERSON], respectively. It is noteworthy that \(sk_{A}\) and \(sk_{B}\) are maintained only by [PERSON] and [PERSON], respectively. Moreover, for a message \(M\), let \(c_{X}\) be an encrypted version of \(M\) that can be decrypted with \(sk_{X}\), where \(X\in\{A,B\}\).  
Conventionally, to allow [PERSON] to decrypt \(c_{A}\), [PERSON] first decrypts with \(sk_{A}\) and encrypts with \(pk_{B}\), or may employ a third party, which is known as a proxy. In the latter case, [PERSON] first segregates \(sk_{A}\) between [PERSON] and the proxy, whereas \(c_{A}\) is partially decrypted by the proxy and then finally decrypted by [PERSON] [45; 46]. However, this approach requires [PERSON] to possess an additional secret key for every delegation that he accepts [47]. Therefore, a PRE scheme was proposed.  
The concept of the PRE scheme is as follows. First, four parties are involved: a delegator ([PERSON]), a delegate ([PERSON]), a key distributor, and a proxy. The aim of the key distributor is to generate and distribute keys that include the keys of various participants (\(pk_{X}\) and \(sk_{X}\)) and the re-encryption key (\(rk\)). As shown in Figure 2, let us consider the case in which [PERSON] delegates the access authority of message \(M\) to [PERSON]. The aim of the proxy is to re-encrypt \(c_{A}\) to \(c_{B}\) using only \(rk\) without decryption.  
After its introduction by [PERSON], [PERSON], and [PERSON], the PRE scheme has received considerable attention, and more developed PRE schemes have been developed thereafter. Generally, the PRE scheme can be categorized into two types: unidirectional and bidirectional. The bidirectional PRE scheme allows users to re-encrypt the ciphertext repeatedly, whereas the unidirectional PRE allows only a one-time re-encryption. The first proposed method is bidirectional PRE. However, the bidirectional PRE scheme has a few shortcomings: the delegation in the scheme is transitive and the delegator's secret key can be completely recovered if the proxy and delegate collude. Hence, systems that treat privacy-sensitive data employ unidirectional PRE schemes [28]. In the proposed scheme, we used unidirectional PRE because the re-encrypted data can no longer be re-encrypted.  
Figure 2: Process of unidirectional proxy re-encryption.