SummaryCloud storage in the network enables the users to access the data from anywhere irrespective of any devices, which prevents data loss and provides centralized management. The cloud server is a pooled, centrally located server resource that many users can access as needed. More efficient data storage and processing could be achieved through fog computing devices and, the fog node handles the task including the semantic transformation of the data before transmitting it to the back‐end cloud servers, managing the process of data from several edge devices simultaneously. The security of the cloud and fog nodes acts as a key component, and that must be ensured for effective computations. In this research, the security of the fog‐assisted Internet of Things (IoT) network is enhanced using the proposed advanced encryption credibility approach (Ad‐En credibility approach), which ensures the privacy and security of the networks by preventing malicious attempts of accessing the data. The proposed Ad‐En credibility approach is performed based on a modified Diffie‐Hellman algorithm that consists of different phases such as the setup phase, entry and identity phase, fog node entry validation phase, and authentication phase. These phases perform different functions and provide strong authentication mechanisms that secure the data with high confidentiality by detecting malicious attempts within a reduced time. The efficiency of the research is proved by measuring the computational time, memory usage, and detection rate. The proposed Ad‐En credibility approach consumed less time of 7 s and memory usage of 8.17 mb with a high detection rate of 85.34%.