# Secure and Efficient Deduplication for Cloud Storage with Dynamic Ownership Management
## 5 The Proposed Secure Deduplication Protocol
### Ownership Update  
The ownership updates occur in subsequent uploads, i.e., when another client attempts to upload the same data while data are already stored in the cloud storage. During an ownership update, the group key is refreshed and distributed to the clients. Suppose that the session prior to the data upload of the client \(j\) is session \(I\). When a client \(j\) successfully uploads data, it initiates a new session, which is now referred to as session \(J\). 1. **Upload pre-work. ** The same as **Step 1** of the subsequent upload in Section 5.2. 2. **Deduplicate data. ** * The CS calculates the hash value \(h(M)\) of the received \(M\). * The CS checks whether \(h(M)\) and \(r_{j}\) exist in the \(ACL\). If information about \(h(M)\) exists in the \(ACL\) of the CS, but client \(j\) is not registered as the owning client, an ownership update should be made. * The CS stores the random value \(r_{j}\) of client \(j\) in the \(ACL\). * The CS sends a data re-encrypting request with \(h(M)\) to the cloud storage. The hash value, denoted as \(h(M)\), plays a crucial role in identifying the specific data requested for updating in the cloud storage. 3. **Re-encrypt data. ** * The cloud storage generates a group key, denoted as \(GK_{J}\), by encrypting the results of XOR operations on \(h(M)\) and session \(J\) with the cloud storage's \(SK_{C}\). In this context, the encryption with the cloud storage's secret key is achieved through symmetric key encryption. The hash value \(h(M)\) is received from the CS. * The cloud storage generates re-encrypted data, denoted as \(RC_{J}\), by conducting an XOR operation on \(RC_{I}\), \(GK_{I}\), and \(GK_{J}\). Accordingly, the re-encrypted data \(RC_{J}\) take the form of \(C\bigoplus GK_{J}=RC_{J}\). The previous group key, denoted as \(GK_{N}\), serves to decrypt the ciphertext \(C\) within \(RC_{N}\). Essentially, the cloud storage stores only \(RC_{N}\) for efficient storage space utilization. Whenever an ownership update occurs, the cloud storage recovers the original ciphertext \(C\) using the group key \(GK_{N}\) from \(RC_{N}\) stored in the \(CTL\). In addition, the cloud creates re-encryption data, \(RC_{N+1}\), through an XOR operation on ciphertext \(C\) and \(GK_{N+1}\). Importantly, a new group key is generated independently of any prior session. This independence arises because when the cloud storage generates a session value, it remains disconnected from previous sessions, ensuring that each session operates independently. * The cloud storage stores \(GK_{J}\) and \(RC_{J}\) created in the above two processes. * The cloud storage generates \(RGK\) to distribute the refreshed group key to clients. * \(GK_{J}=RGK_{adder}\); * \(GK_{I}\bigoplus GK_{J}=RGK_{other}\). In subsequent uploads, both the existing data owners from the previous session and new owners are involved. Thus, the cloud storage creates two type of refreshed group keys: the \(RGK_{adder}\) for newly added owners and \(RGK_{other}\) for existing owners. For newly added owners, \(RGK_{adder}\) includes only \(GK_{N}+1\), because the new owners are not aware of the previous session \(N\). For existing owners, \(RGK_{other}\) consists of \(GK_{N}\) and \(GK_{N+1}\). And, the prior group key \(GK_{N}\) of \(RGK_{other}\) serves to verify the ownership of previous owners. * The cloud storage sends the generated \(RGK_{adder}\) and \(RGK_{other}\) to the CS to requests it to be sent to the data owner. **Step 4. **: **Send refreshed group key. **  
* The CS sends the refreshed group key to the client based on the \(h(M)\) and \(r_{i}\) stored in the \(ACL\). Suppose that the clients with \(h(M)\) are \(j\) (additional uploader) and \(i\) (existing owner). * For additional uploader \(j\):
* The CS generates \(CRGK_{j}\) by performing an XOR operation on the random value \(r_{j}\) of client \(j\) and the \(RGK_{adder}\). * The CS sends \(CRGK_{j}\) to client \(j\). * The client \(j\) recovers \(GK_{j}\) from the value received. * \(CRGK_{j}\bigoplus r_{j}=GK_{j}\).