The cloud is a widely used technology for inter-organizational data exchange and managing digital information. Even though it offers significant potential for user convenience it is subjected to different security as well as privacy issues due to the refusal of the cloud peer to disclose their identity to others. This arise the need for an effective data exchange among different cloud peers by preserving the anonymity and data privacy of the users. Hence, an anonymous secure data exchange solution is presented in this article by employing authentication as well as key agreement (AKA) protocol. The Fuzzy Logic-Based Anonymous Identity Generation Module is used to improve the data security and user privacy of the AKA protocol by establishing mutual authentication for multiple users via the session keys. The use of the peer-to-peer (P2P) cloud system in this study offers secure and reliable storage since data is partitioned into small blocks and stored in multiple locations. The fuzzy logic model offers registration services and prevents the P2P cloud from various attacks and temporary key leakage issues using the session key. The proposed model is tested on the NIST Special Database 302, and it demonstrates superior performance compared to existing methods. Experimental results confirm the effectiveness of the proposed method in achieving better security and resilience against various cyber-attacks. Furthermore, it minimizes communication overhead during the authentication process and provides resistance against various cyber-attacks. In this manner, the proposed model withstands different attacks and preserves user privacy when compared to the baseline security protocols.