Fog computing is one of the prominent technology that bridges the gap between IoT nodes and cloud servers. For increasing the efficiency at the fog level, a fog federation can be employed. Fog federation at the fog level can be controlled by the fog coordinator. However, the information exchange between the fog coordinator and IoT nodes needs to be secured. Recently, a lightweight secure key exchange (LKSE) protocol for secure key exchange for fog federation was proposed. In this paper, the cryptanalysis of the LKSE is carried out. The cryptanalysis indicates that LKSE is vulnerable to spoofing and man in the middle attacks. To overcome the limitation of the LKSE, a design of an ECC-based secure key exchange protocol for IoT devices and fog coordinators is proposed. The security strength of the designed method has been evaluated using BAN logic and the random oracle model. Simulations on AVISPA have been performed for automatic security verification of the proposed method. A detailed security and functional comparison of the proposed scheme with LKSE have also been carried out.