Mobile Multimedia Laboratory



P2PWNC: Peer-to-peer Wireless Network Confederation RI - Documentation





This package contains utilities for key and certificate generation and for notifying the TCA module (when requiring fixed team identities) that a new team has been generated.



This is free software, available under the GNU General Public Licence. For more information see COPYING.



This is version 0.0.1 of the P2PWNC utilities.



  • keygen.c: Utility for key and certificate generation

  • teamgen.c, teamgen.h: Utility for notifying the TCA program that a new team has been generated


This module runs on Linux. It has been tested under Linux 2.4/2.6. It depends on the P2PWNC libraries, and in particular
libpwnc
(protocol module, etc) and
lib3p
(threading, cryptography). Therefore, in order to build this software for your system, make sure the P2PWNC libraries are already installed. Also, you need to have support for System V IPC, since it is required for the communication between the tca and teamgen processes, which takes place via a sessage queue.



For generic configuration instructions see the INSTALL file or type
./configure --help
. Next, there is a list of some configuration directives specific to the P2PWNC utilities:
  • --prefix=<some path>: Replace <some_path> with the installation path for the software. By default, this prefix is /usr/local. However, you are encouraged to change it to a directory of your preference, such as /usr/local/p2pwnc-utils.

  • --with-p2pwnc-libs=<path_to_p2pwnc_libraries>: Supply the path where the P2PWNC libraries are installed. By default, this path is /usr/local/p2pwnc-libs. Change it to the path where these libraries are installed on your system.


To build the software, you can follow the steps below:

  • Untar the archive (tar xvfz p2pwnc-utils-vXXX.tar.gz)

  • cd to the source directory

  • Configure the software typing ./configure and using the above instructions

  • Type make to compile the sources


After building the software, type 'make install'. This will install the software to the <prefix> directory (as specified when configuring the package). This will create the following directory structure:


+-prefix
|
+-bin
  |- keygen
  |- teamgen

To uninstall it, type 'make uninstall'.



To run the P2PWNC key generation utility:

  • Type
    ./keygen
    for usage information
    As an example, 160 bit ecc key pair and certificate generation will be described.

  • First, generate the team key pair:

    ./keygen ECC 160


    This will create two files,
    new_ecc_pub_key_160
    and
    new_ecc_priv_key_160,
    containing the public and the secret key of the new team respectively.

  • Rename the two files to team.pub and team.priv respectively

  • Run the keygen program again to generate the team member's keys and certificate:

    ./keygen ECC 160 team.pub team.priv


    This will create 3 files,
    new_ecc_pub_key_160
    ,
    new_ecc_priv_key_160
    and
    newcert
    . The 3rd file is the member certificate. This certificate contains the new public key (
    new_ecc_pub_key_160
    ), the issuing team's public key (
    team.pub
    ) and the signature generated using the team's secret key (
    team.priv
    ).

The teamgen program sends a message to the TCA process via a message queue, provided that the TCA demands that team identities are fixed, thus keeping track of the team public keys that it has generated. To add a new team to the TCA's database, first generate the team's keys and then use the teamgen program as follows:

./teamgen add path_to_new_team_public_key mq_key


(
mq_key
is the message queue key, defaulting to 321)

When executing the programs, you may get the following error:

./keygen: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory


The solution is to set the LD_LIBRARY_PATH environment variable appropriately, since the system cannot locate the libraries against which the P2PWNC utilities have been linked. To set this variable issue the following command:

export LD_LIBRARY_PATH=/usr/local/p2pwnc/lib/:/usr/local/openssl/lib/


(these are sample paths, use the paths specific to your installation)