A wireless ad hoc network that has no connection to the Internet can not use a Public Key Infrastructure(PKI). Although an on demand distributed public key management to construct the PKI has been proposed, it cannot work without considering routing tables, since nodes broadcast a packet which contains routing tables. In this paper, we propose an on demand distributed public key management which can separate the routing and authentication layers. In the proposed scheme, each node sends a packet which does not contain routing tables by unicasting. The proposed scheme can be applied to various communication protocols and simple terminals because the scheme does not need to consider routing tables in the authentication layer. By a computer simulation, we evaluate average traffic and show the adaptive flexibility of the proposed scheme in the ad hoc network.