To solve the privacy-preserving problem of both the user and the server in indoor positioning,outsourcing part of the calculation to cloud server in the process of using Paillier encryption was considered.The scheme not only pro-tected the privacy of the user and the positioning server,but also avoided excessive computing and communication over-head.The main idea of the scheme was that the fingerprint database in the offline stage was established by the server firstly.The k-anonymity algorithm was combined with Paillier encryption in the online stage by the user,and the en-crypted Wi-Fi fingerprints were sent to the positioning server.An aggregation of the received Wi-Fi fingerprints and da-tabase fingerprints were performed by the server.Then they were outsourced to the cloud server for decryption and dis-tance calculation by the positioning server.Finally,the positioning result was obtained.Theoretical analysis and experi-mental results show that the proposed scheme is safe,effective and practical.