In ubiquitous environments, there are a huge number of computer nodes which provide a lot of information services via the Internet. Therefore, a secure communication system is required for ubiquitous environments. In this paper, we propose a new architecture of distributed public key infrastructure, named as Hash-based Distributed Public Key Infrastructure (HDPKI). A HDPKI system achieves a scalable management of public key certificates by using Distributed Hash Table. Additionally, it is easy to use a HDPKI system, because we can register our public key certificates automatically. In this paper, we show scalability of HDPKI through computer simulation. According to these results, the total amount of required messages for certificate management in a HDPKI system is O(log n) where n is the number of nodes.