1. A method of a node for generating a group key applied to a plurality of nodes, the method comprising: sharing a first secret key with a first adjacent node of a plurality of adjacent nodes and sharing a second secret key with a second adjacent node of the plurality of adjacent nodes; obtaining first and second function values by operating the first secret key and the second key; obtaining a first result value using the first and second function values; broadcasting the first result value to the plurality of other adjacent nodes; receiving other result values from the plurality of other adjacent nodes; and performing an operation on a plurality of function values extracted from the first function value and the other result values, to obtain a group key.