Fog-to-Cloud (F2C) is a novel paradigm aimed at increasing the benefits brought by the growing Internet-of-Things (IoT) devices population at the edge of the network. F2C is intended to manage the available resources from the core to the edge of the network, allowing services to choose and use either a specific cloud or fog offer or a combination of both. Recognized the key benefits brought by F2C systems, such as low-latency for real-time services, location awareness services, mobility support and the possibility to process data close to where they are generated, research efforts are being made toward the creation of a widely accepted F2C architecture. However, in order to achieve the desired F2C control framework, many open challenges must be solved. In this paper, we address the identity management challenges and propose an Identity Management System (IDMS) that is based on the fragmentation of the network resource IDs. In our approach, we divide the IDs into smaller fragments and then, when two nodes connect, they use a portion of their full ID (n fragments) for mutual identification. The conducted experiments have shown that an important reduction in both, the query execution times and the space required to store IDs, can be achieved when our IDMS is applied.