Information is uploaded and downloaded through the Internet day in and day out ever since we immersed ourselves in the Internet. Data security becomes an area demanding high attention and one of the efficient techniques to protect data is data hiding. Among various data hiding schemes, more applications prefer the schemes with reversibility. In recent reversible data hiding studies, the indices of a codebook can be reordered to hide secret bits. The hiding capacity of the codeword index reordering scheme increases when the size of the codebook gets larger. Since the codewords in the codebook are not modified, the visual performance of compressed images is retained. We propose a novel scheme making use of the fundamental principle of codeword index reordering technique to hide secret data in encrypted images. By observing our experimental results, the embedding capacity is significantly larger. Secret data can be extracted when a receiver owns a data hiding key and image can be recovered when a receiver owns an encryption key.