The popularity of cloud computing has impelled more users to upload personal data into the cloud server. The need for secure transmission and privacy protection has become a new challenge and has attracted considerable attention. In this paper, we propose a high-capacity reversible data hiding scheme in encrypted images (RDHEI) that compresses prediction errors in usable blocks of block-based encrypted images. On the content owner side, the original image is divided into
2
×
2
sized blocks, and each block is encrypted by block-based modulation. On the data hider side, an efficient block-based predictor is utilized to generate prediction errors. The Huffman coding technique is introduced to compress prediction errors in the usable blocks to embed abundant additional data. On the receiver side, the additional data can be totally extracted with a data hiding key and the original image can be losslessly recovered with an image encryption key. Experimental results demonstrate that the embedding rate of our proposed scheme is significantly improved compared to those of state-of-the-art schemes.