Data Security is one of the most critical aspects in a cloud computing environment due to the sensitivity and importance of information stored in the cloud. The risk of malicious insiders in the cloud and the failure of cloud services have received a great deal of attention by companies. This paper is related to data security and privacy. The data owner stores the encrypted data in the cloud, and issue decryption keys to authorized users. Then, when a user is revoked, the data owner will issue re-encryption commands to the cloud to re-encrypt the data, to prevent the revoked user from decrypting the data, and to generate new decryption keys to valid users, so that they can continue to access the data.