Cloud computing is an internet-based system that allows clients to access computers, software, infrastructure, devices, and other resources through a subscription model. Data security is a major concern for the cloud computing model. Data security is a research challenge in any cloud environment. When cloud users upload their confidential and secret data through the cloud, the security of this data must be ensured. In order to improve data security, a new method is presented in this paper. The approach uses ten random prime integers to compute the public and safe private keys after transforming user data into a matrix format. The encrypted content is then decrypted using the secured private key, improving total data security. The Hackman tool is used to analyse the encryption and decryption times as well as the security level. The OPNET tool measures the power of encryption and decryption. The findings indicate that all five potential file sizes for the proposed algorithm's parameters have the highest value. The cypher text was analysed using this suggested technique using brute force and dictionary attacks. This method is more effective, more secure, and impenetrable.