We tackle in this paper the problem of public-key distribution. We can summarize the issue in the following question: How can a user u obtain the authentic public key of another user v in the presence of an active attacker?

We implement a solution presented by JP Hubaux based on public key certificates. cite{certs_quest} A public-key certificate acknowledges the identity of the issuer of the certificate. When user u wants to obtain the authentic public key of user v, it acquires a chain of public-key certificate

such that leads to the public key of u.

We use a public-key distribution system suitable for self-organized mobile ad-hoc networks in which public-key certificates are issued by the users. We do not rely on certificate directories for the distribution of certificates, users store and distribute certificates. Each user has maintains a certificate repository that contains a set of certificates selected by the user according to an algorithm. When user u wants to obtain the public key of user v, they merge their local certificate repositories, and u tries to find an appropriate certificate chain from u to v in the merged repository.

In our public-key distribution system, each user maintains a local repository of public-key certificates. This repository has two parts. First, each user stores the certificates that she issued. This is needed in order to store all the certificates issued in the system in a decentralized way. Second, each user stores a set of selected certificates issued by other users in the system. In terms of our model, this means that each user u stores the outgoing edges (with the corresponding vertices) from vertex u and an additional set of selected edges (with the corresponding vertices) of the trust graph. We refer to the set of selected edges (and vertices) as the sub-graph that belongs to u. When user u wants to verify the public key of user v, u and v merge their repositories of selected certicates, and u tries to find an appropriate certificate chain from u to v in the merged repository. In the model, u and v merge their sub-graphs, and u tries to nd a path from vertex u to vertex v in the merged sub graph. An example is shown in Figure.