Mobile Multimedia Lab



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






This is the implementation of the P2PWNC libraries, against which other P2PWNC modules are linked. Three libraries can be built:


  • The P2PWNC protocol module (libpwnc.so) contains the implementation of the P2PWNC protocol core. It provides message generation and parsing routines, basic data types and entity representation, etc. This library is required by all other P2PWNC modules.

  • The 3rd party libraries-based module (lib3p.so) provides an API to perform threading and cryptographic operations. This library is required by all other P2PWNC modules. It depends on libpwns.so.

  • The receipt database module (librdb.so) is the implementation of the receipt database. This module is not necessary for the operation of the access point, client and P2PWNC utilities (e.g. key generation). It depends on lib3p.so an libpwnc.so.



This is free software, available under the GNU General Public Licence. Some modules come with an exception for linking with the OpenSSL tooklit libraries. For more information see COPYING.



This is version 0.0.1 of the P2PWNC libraries.



  • proto: P2PWNC protocol module

  • 3rdparty: Libraries based on 3rd party software (threading and cryptographic operations, based on OpenSSL)

  • rdb: Receipt database module

  • include: Include files


This module runs on Linux. It has been tested under Linux 2.4/2.6. The cryptographic operations, as well as the receipt database module depend on OpenSSL. In order to support for both RSA and Elliptic Curve cryptography, you need to make use of OpenSSL version 0.9.8. Threading support depends on a POSIX threads implementation. Both the receipt database (librdb) and the 3rd party software-based libraries (lib3p) depend on the P2PWNC protocol module (libpwnc).



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 ap software:

  • --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-libs.

  • --enable-maxflow: Enable/Disable a maxflow-based decision function. This option is enabled by default. You are encouraged to use it, since it produces more fair results. In case you disable it, a score-based decision function will be used (i.e., the result of the decision function will be based on the teams' "scores", that is the total amount of service provisions of the P2PWNC teams). However, you are not encouraged to use this method, since it is vulnerable to false trading.

  • --enable-neighbors-ht: Use a hash table to find a graph node's neighbor (used during maxflow). Yoo're encouraged to use it *only* for dense receipt graphs! In other cases, linear search will be performed(default is NO).

  • --enable-headers: Install header files (default: yes). You will need to enable this option in case you intend to develop applications based on the P2PWNC libraries. However, when building the libraries for use on the Linksys WRT54GS wireless router (or a similar embedded device), you'd better disable it since the header files are not necessary and will waste precious space.

  • --enable-cryptosystem: Choose the cryptosystem support. Supply the ecc argument for both ECC *and* RSA cryptography, or the rsa argument if your want support only for RSA. The default value is ecc.

  • --enable-perm-storage: Support for permanent data storage (default is yes).

  • --enable-fixed-ids: Support for fixed team identities. When this option is chosen, the system keeps track of the teams (key pairs) it has generated. For example, when a new receipt is to be added in the database, a check takes place to ensure that both teams are *known* to the system. If the option is disabled, no such checks occur and a user is free to switch identities (generate new key pair) at will. Although the default is no, you are encouraged to use it in some settings (e.g. when there is a trusted central authority maintaining the receipt repository)

  • --enable-rdb: Build receipt database support (default is no). You only need to build the receipt database module (librdb) in the case of the TCA or team server software, that is for the modules that need to store receipts.

  • --with-openssl: OpenSSL installation path (by default: /usr/local/openssl)



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

  • Untar the archive (tar xvfz p2pwnc-libs-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
|
+-include
| |- proto.h
| |- crypt.h
| |- ....(include files)
|
+ lib
|- lib3p.a
|- lib3p.so.0
|- lib3p.la
|- lib3p.so.0.0.0
|- lib3p.so
|- libpwnc.a
|- ...
|- librdb.a
|- ...