The emergence of IoT applications has risen the security issues of the big data sent by the IoT devices. The design of lightweight cryptographic algorithms becomes a necessity. Moreover, elliptic curve cryptography (ECC) is a promising cryptographic technology that has been used in IoT. However, connected objects are resource-constrained devices, with limited computing power and energy power. Driven by these motivations, we propose and develop a secure cryptographic protocol called CoopECC which leverages the organization of IoT nodes into cluster to distribute the load of cluster head (CH) among its cluster members. This technique proves that it optimizes the resource consumption of the IoT nodes including computation and energy consumption. Performance evaluation, done with TOSSIM simulator, shows that the proposed protocol CoopECC outperforms the original ECC algorithm, in terms of computation time, consumed energy, and the network’s lifespan.