Protecting the medical data on the online platform for transmitting data is a simple and demanding task. In the modern world, various methods are used to safeguard the digital image such as cryptography, watermarking, and steganography. These methods are used for protecting digital images in order to achieve security objectives such as confidentiality, reliability, and usefulness. In the proposed method, the medical images are encrypted and stored in cloud using DNA Homomorphic Encryption (DNA-HE) algorithm. The key is generated using Rider Optimization Technique to ensure security. It acts as double encryption technique. Homomorphic encryption is an authentication approach that allows one to perform observations on encrypted data by decrypting it. In DNA Homomorphic Encryption algorithm, the input data will be a DNA sequence. The same procedure is used to decrypt the encrypted data. Performance of the proposed technique is evaluated using a number of factors, including execution, encryption, and decryption times.