Recently P2P networks become more and more popular. Though they have many advantages, P2P networks suffer from authentication of nodes. To overcome this problem, a new authentication method called Hash-based Distributed Authentication Method (HDAM) is proposed in this paper. HDAM realizes a decentralized efficient mutual authentication mechanism for each pair of nodes in the P2P network. It performs a distributed management of public keys by using Web of Trust and Distributed Hash Table. The authors' proposed scheme significantly reduces both the memory size requirement and the overhead of communication data sent by the nodes.