# Efficient and HRA Secure Universal Conditional Proxy Re-Encryption for Cloud-Based Data Sharing
### Motivation  
The existing CPRE schemes can practically address the issues when encryption schemes and proxy re-encryption schemes are used in cloud-based data sharing. Nevertheless, the existing CPRE schemes are not applicable to support an encrypted data switching mechanism that the proxy can convert the ciphertext under a homomorphic encryption scheme into a (possibly different) homomorphic encryption scheme. This encrypted data switching mechanism is more actual situation in cloud-based data sharing because it is a common phenomenon in which the data owner has stored the encrypted data under a homomorphic encryption scheme (e.g., Elgammal encryption) before deciding to share data with someone. Therefore, securing the switching mechanisms between two homomorphic encryption schemes is meaningful in actual cloud-based data sharing.  
Recently, [PERSON] and [PERSON] [2] proposed a universal proxy re-encryption scheme that solves the issue of ciphertext transformation from an encryption scheme to a (different) encryption scheme. However, their work does not support fine-grain access control for the ciphertext. Meanwhile, the computing cost of delegatee is related to the number of multihop. That is, the delegatee needs to undertake an enormous computation cost so that the work does not apply to the cloud-based data sharing when the data user has a weak mobile device. This motivates us to design a new ciphertext switching mechanism that the proxy transfers encrypted data under a homomorphic encryption scheme into encrypted data under a homomorphic encryption scheme effectively. In other words, the data user with weak mobile devices has low computing overhead such that our mechanism is valid to be used for data sharing in clouds. Meanwhile, our mechanism allows the proxy (e.g., the cloud server) to transfer the authorized ciphertext via the re-encrypted key. Thereform, the proxy needs to convert the ciphertext according to the will of the data owner.  
Imagine a data owner Alice is under the homomorphic encryption scheme (e.g., Elgammal encryption). It means that he has a pair of keys (\(\text{sk}_{Alloc},\text{pk}_{Alloc}\)) from the Elgammal encryption so that he can encrypt his data \(m_{1},m_{2},m_{3}\) via his public key and store encrypted data \(\text{ct}_{1},\text{ct}_{2},\text{ct}_{3}\) in the cloud server, where \(\text{ct}_{1}=\text{Enc}(\text{pk}_{Alloc},m_{1})\), \(\text{ct}_{2}=\text{Enc}(\text{pk}_{Alloc},m_{2})\), \(\text{ct}_{3}=\text{Enc}(\text{pk}_{Alloc},m_{3})\). While it is someday, [PERSON] wants to share the data \(m_{1}\) and \(m_{3}\) with his friend [PERSON]. [PERSON] also has a pair of keys (\(\text{sk}_{Bob},\text{pk}_{[PERSON]}\)) from a homomorphic encryption scheme (e.g., Paillier encryption). Our UCPRE should satisfy the following function: The proxy has the ability to transfer the ciphertexts \(\text{ct}_{1},\text{ct}_{3}\) under the Elgammal encryption into the ciphertexts \(\text{ct}_{1}^{\prime},\text{ct}_{3}^{\prime}\) under the Paillier encryption via the re-encryption key. Figure 1 depicts the idea of our UCPRE system for data sharing in clouds. In such a UCPRE system, the data owner [PERSON] needs to generate a re-encryption key for each data that will be shared with [PERSON]. In other words, the proxy can share the authorized data \(m_{1},m_{3}\) with [PERSON] via the re-encryption keys \(\text{rk}_{A\to B,1}\) and \(\text{rk}_{A\to B,3}\) form [PERSON], respectively. With the motivation in mind, we present an efficient and secure notion--universal conditional proxy re-encryption (UCPRE).