Spectrum sensing is one of the most essential components of cognitive radio since it detects whether the spectrum is available or not. However, spectrum sensing accuracy is often degraded due to path loss, interference, and shadowing. Cooperative spectrum sensing (CSS) is one of the proposed solutions to overcome these challenges. It is a key function for dynamic spectrum access that can increase largely the reliability in cognitive radio networks. In fact, several users cooperate to detect the availability of a wireless channel by exploiting spatial diversity. However, cooperative sensing is also facing some series of security threats. In this paper, we focus on two major problems. The first problem is the localization preservation of the secondary users. In fact, malicious users can exploit spatial diversity to localize a secondary user by linking his location-dependent sensing report to his physical position. The existing solutions present a high level of complexity which decreases the performance of the systems. The second problem is the data injection attack, in which malicious CR users may affect the decisions taken by the cognitive users by providing false information, introducing spectrum sensing data falsification (SSDF). In fact, they can submit false sensing reports containing power measurements much larger (or smaller) than the true value to inflate (or deflate) the final average, in which case the fusion center may falsely determine that the channel is busy (or vacant) which increases the false alarm and miss detection probabilities. In this paper, we propose a novel scheme to overcome these problems: iterative per cluster malicious detection (IPCMD). It utilizes applied cryptographic techniques to allow the fusion center (FC) to securely obtain the aggregated result from various secondary users without learning each individual report. IPCMD combines the aggregated sensing reports with their reputation scores during data fusion. The proposed scheme is based on a new algorithm for key generation which can significantly reduce the key management complexity and consequently increase the system performance. Therefore, it can enable secure cooperative spectrum sensing and improve the secondary user location privacy.