With the rapid growth of the number of images, many content-based image retrieval methods have been extensively used in our daily life. In general, image retrieval services are very expensive in terms of computing and storage. Therefore, outsourcing services to the cloud server is a good choice for image owners. However, privacy protection can become a big issue for image owners because the cloud server can only be semi-trusted. In this paper, we propose a novel image retrieval scheme. It is a ciphertext image retrieval method based on random mapping features with the bag-of-words model. After encrypting the image with Advanced Encryption Standard and block permutation, the cloud server generates random templates and then extracts the local features. All local features are clustered by k-means algorithm to form the visual word. The histogram of encrypted visual words is constructed in this way as the feature vector to represent each image. The similarity between images can be measured by the distance between feature vectors on the cloud server. Experiments and analysis prove the effect of the scheme. INDEX TERMS Image retrieval, AES encryption, BOW model, random mapping.