0% found this document useful (0 votes)
103 views

Chat Client Example

This document describes a chat client example that uses a secure peer-to-peer framework. The chat client is a simple application built on top of the framework's API. It can connect peers locally or remotely as specified in configuration files. These files define parameters like authentication methods, routing algorithms, and network details like peer IDs and connection ports. The document provides instructions for running the chat client and an explanation of the configuration files used to set up and connect the peer nodes.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Chat Client Example

This document describes a chat client example that uses a secure peer-to-peer framework. The chat client is a simple application built on top of the framework's API. It can connect peers locally or remotely as specified in configuration files. These files define parameters like authentication methods, routing algorithms, and network details like peer IDs and connection ports. The document provides instructions for running the chat client and an explanation of the configuration files used to set up and connect the peer nodes.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Institute for Applied Information Processing and Communications

Chat Client Example


Secure Peer-to-Peer Framework

http://sourceforge.net/projects/securep2p
Stefan Kraxberger
Institute for Applied Information Processing and Communications
Graz University of Technology, Inffeldgasse16a, Austria
stefan kraxberger@iaik tugraz at
[email protected]
www.iaik.tugraz.at

Stefan Kraxberger Secure P2P Framework


1
Institute for Applied Information Processing and Communications

Ch tCli t Example
ChatClient E l
• Simple chat client on top of
SePP API
• Can be configured through
files (res/ folder)
• Peers can be started local
or distributed
• Neighborhood of peers is
specified through
configuration

Stefan Kraxberger Secure P2P Framework


2
Institute for Applied Information Processing and Communications

St ti the
Starting th chat
h t client
li t
SePP folder contains several files
• console_chat (Linux/Windows)
• start_chat (Linux/Windows)
• .project (Eclipse)
• Readme.txt
console_chat
l h t andd start_chat
t t h t onlyl require
i a value l as input
i t
parameter which refers to the peer number start_chat 1
Run configurations in eclipse must specify
• Command line parameter (-config res/peerX.config)
• VM argument (-Dlog4j.configuration=file:res/log4j.properties)

Stefan Kraxberger Secure P2P Framework


3
Institute for Applied Information Processing and Communications

C fi
Configuration
ti 1/4
Files in the folder „res“ with ending „.config“ are the configuration
files for the specific peers. E.g.: peer1.config, peer2.config

These files must be specified as command line parameter if


starting a peer (or at least the chat client)

<General>
<UseSecurity>true</UseSecurity> … Should security be used in SePP
<UseDatabase>false</UseDatabase> … Should the message be stored in a database
<DatabaseURI>jdbc:mysql://localhost:3306/</DatabaseURI>
j y q …JDBC URI for the database
<DatabaseUser>sepp</DatabaseUser> …Use for the databse
<DatabasePassword>sepp</DatabasePassword> …Password for the database
</General>

Stefan Kraxberger Secure P2P Framework


4
Institute for Applied Information Processing and Communications

C fi
Configuration
ti 2/4
<Routing>
<Algorithm>
org.sepp.routing.algorithms.DynamicSourceRouting … Implementation class of the routing algorithm to use
</Algorithm>
<RouteCache>
org.sepp.routing.caches.PathCache … Implementation class of the route cache to use
</RouteCache>
<UseReversePath>True</UseReversePath> … If links are bidirectional reverse path can be used
<UseSourceRoutes>True</UseSourceRoutes> … Should source route be used
<UseLinkCache>False</UseLinkCache> … Should a link cache instead of a path cache be used
</Routing>

Stefan Kraxberger Secure P2P Framework


5
Institute for Applied Information Processing and Communications

C fi
Configuration
ti 3/4
<Network>
<RunLocal>True</RunLocal> … „true
true“ if the peers are started locally
<StandardPort>12001</StandardPort> … Port on which this peer listens
<BroadcastPort>12000</BroadcastPort> … Port on which this peer is expecting broadcasts
<MessageTimeout>10000</MessageTimeout> … Time after messages are removed from the queue
<PeerId>peer1</PeerId> … Id of this peer
<Group name="BasePeerGroup">
<Neighbor id="peer2">127.0.0.1:12002</Neighbor> … Specification of the neighbors of this peer
<Neighbor id="peer3">127.0.0.1:12003</Neighbor> including the IP and port information where they
</Group> can be contacted
</Network>

Stefan Kraxberger Secure P2P Framework


6
Institute for Applied Information Processing and Communications

C fi
Configuration
ti 4/4
<Security>
<AuthenticationMethod>SharedSecretAuthentication</AuthenticationMethod> … Authentication method used
<KeystoreType>IAIKKeyStore</KeystoreType> … Type of used keystore
<PrivateKeystore>key/iaik-private.keystore</PrivateKeystore> … Location of public key keystore
<PrivateKeystorePassword>smepppass</PrivateKeystorePassword> … Password of the public key keystore
<UseSecretKeystore>false</UseSecretKeystore> … Should a secret keystore be used
<SecretKeystore>key/iaik-secret.keystore</SecretKeystore> … Location of secret key keystore
<SecretKeystorePassword>smepppass</SecretKeystorePassword> … Password of the secret key keystore
<DefaultTransformation>RSA/ECB/PKCS1Padding</DefaultTransformation> … Default public key algorithm
<KeyPassword id="SMEPP">smepppeer</KeyPassword> … Password of the stored shared secret
<KeyPassword id=
id="peer1">smepppeer</KeyPassword>
peer1 >smepppeer</KeyPassword> … Password of the stored private key
</Security>

Stefan Kraxberger Secure P2P Framework


7

You might also like