The Content-Based Image Retrieval (CBIR) technique has garnered significant interest from a variety of fields with the advent of intelligent terminals (i.e., cloud computing, social networking services, etc.). Despite the fact that current privacy-preserving CBIR methods can provide image privacy while enabling image retrieval, these schemes nevertheless have fundamental flaws (i.e., low search accuracy, low search efficiency, key leakage, etc.). In this research, we present a similarity search for encrypted images in secure cloud computing to address these difficult problems (called SEI). First, search accuracy is improved by using the feature descriptors that the Convolutional Neural Network (CNN) model has extracted. Then, in order to increase search performance, an encrypted hierarchical index tree is created using K-means clustering based on AP clustering. Then, to prevent the secret from being totally leaked to unreliable image consumers, a limited key-leakage k-Nearest Neighbor (kNN) approach is suggested. Finally, SEI is strengthened to further guard against the cloud server learning about image customers’ search terms. Our rigorous security analysis demonstrates that SEI can safeguard both key and image privacy. Our empirical tests on a real-world dataset demonstrate how SEI provides better search accuracy and efficiency.