This paper surveys key management protocols for wired and wireless networks, categorizing them into peer-to-peer and group communications, with a focus on key generation, agreement, and distribution aspects. It discusses various symmetric and asymmetric key protocols and their strengths and weaknesses, along with their application in secure communication. The study highlights the importance of effective key management mechanisms and offers insights for future research in the field.