Now-a-days many unauthorized users try to get the protected information and therefore it is necessary to secure our data. Besides, there are also scenarios that data hiding needs to be done in the encrypted domain or combined with the encryption, especially in the age of big data and cloud computing. In previous method first encryption was done and then the room was vacated to hide the data. But there were some errors in data extraction and image recovery. In this paper a novel technique is proposed termed as reversible data hiding (RDH) by which we can hide our data. RDH is applied to encrypted images by which we can properly recover our data and the cover image. The hidden data can be in the form of text or image. In the proposed method we first vacate room to hide data and after encrypting image using certain encryption key the data hider reversibly hides the data whether text or image using data hiding key. In previous method only text was hidden. But the proposed paper is extended to hide the image also in the same reserved space which was used to hide text. The hidden image is also recovered without any errors. The results given in the paper proves that we can exactly recover the hidden data, hidden image and the cover image as and when needed by the receiver. The traditional RDH algorithm used is histogram shifting. By this method we can properly recover hidden data and cover image without any errors. Large amount of data can be hidden as compared to previous method. © 2015 IEEE.