Data integrity verification is an important technical method to detect the integrity of remote cloud storage data. At present, the existing data integrity verification algorithms generate data tags for outsourced data blocks before verification, and then use these data tags to verify the data integrity proofs provided by the data storage provider and determine whether the corresponding data blocks are intact. Unfortunately, most of these algorithms do not check the reliability of data tags. Once the data tags are compromised due to the exposure of the private key of data owner, the corrupted data can easily bypass subsequent verification, thereby invalidating the verification. To solve this issue, we propose a secure and reliable data tag replacement algorithm DTRA. The proposed algorithm uses proactive and reactive replacement to update the data owner’s private key. In addition, the algorithm applies homomorphic encryption to implement data tag replacement directly in the remote storage environment, avoids data owner downloading outsourced data from remote storage space, and reduces the data transmission overhead caused by data tag replacement. Theoretical analysis and experimental results indicate that the algorithm can achieve data tag replacement safely and reliably at a low cost.