Ad hoc networks are characterized by the lack of a fixed infrastructure and the dynamic nature which affects several security properties. This paper adapts the concept of PKI so that it fits with the requirements of wireless ad hoc networks. Furthermore, a protocol for authenticating nodes in multihop ad hoc networks is discussed.