<p>Fog computing (FC) has evolved as a significant paradigm within the internet of things (IoT) ecosystem, serving as a crucial link between edge devices and centralised cloud computing resources. This research paper investigates advanced methodologies for improving the security and efficiency of FC in the IoT domain. The primary emphasis is placed on the utilisation of elliptic curve cryptography (ECC) to accomplish these goals. This study examines the difficulties encountered in ensuring the security of IoT deployments based on FC. It also presents novel solutions based on ECC to mitigate these obstacles. Moreover, this study investigates techniques for enhancing the efficiency and allocation of resources in IoT applications within a FC environment. This study seeks to offer significant insights into the application of ECC-based techniques for enhancing the security and efficiency of FC in the context of the IoTs. These insights are derived through a combination of theoretical analysis and practical implementations. To evaluate the effectiveness of the proposed system, an analysis is conducted to examine the encryption time, decryption time, and correlation coefficients. These metrics are then compared to those of existing state-of-the-art approaches.</p>