DEVELOPMENT INFO

Title:	MyChatSSL
Author Name:	Ray Barham
Mod Date:	6/30/2007
Developed on:	Windows XP
Developed With:	Java(TM) SE Development Kit 6 & JCreator 4.00.028

DESCRIPTION

MyChatSSL is a peer-to-peer chat program that uses Secure Socket Layer (SSL) to provide secure communication between clients.  This version isn’t too different then the original version, MyChat, except for SSL support.

I put myself through a crash course in SSL for this project and went through various revisions in the SSL implementation.  I decided on an implementation that uses the default key and trust stores provided with Java Secure Socket Extension (JSSE) and will also allow the user to specify custom ones if needed.  The reasons for choosing this was ease of implementation and scalability for the user or organization.

The program provides an anonymous cipher suite during default operation.  According to JSSE Reference Guide (http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html) this is normal.  However, if more security is required then a keystore and/or truststore with private and public keys can be provided in the “ssl_settings.dat” file.

This is a very basic implementation of SSL, in my opinion, and I am by far not an expert with it.  Honestly, this has been my only experience with implementing SSL.  If there is anything that is incorrectly done then that is why.  If you do decide to use this program as a means of secure chatting then it is at your own risk.

SETTINGS AND CONFIGURING

There are various files used in the configuring of the chat client.  The file with all the settings is “settings.dat”, the file with the recipient list is “list.csv”, and the file with the SSL settings is “ssl_settings.dat”.  All these files can be easily modified manually and are generated automatically if they are not found by the client.  The following are examples of the contents of the various files.

The settings file - settings.dat

•	username=Jan Doe
o	Set the username of the user of the client to Jan Doe.
•	host=mycomputer
o	Set the host name (or computer name) used by the user of the client to mycomputer.  This should to be the actual computer name or IP of the computer that sends the message.  The program should automatically set this if the settings file is not found.
•	auto_add_recipient=true
o	True to automatically add recipients that send messages to the client that are not already saved, false to not.
•	port=10099
o	The port to send and receive message on.

The recipient list file – list.csv:

•	Jan Doe, myComputer
o	The first field is the recipients name and the second is the recipients host/computer name.  Each line is a recipient.  If the computer name has spaces then they will be trimmed off.

The SSL settings file - ssl_settings.dat:

How to use keytool - Key and Certificate Management Tool
Windows: 
http://java.sun.com/javase/6/docs/technotes/tools/windows/keytool.html
	Solaris or Linux:
http://java.sun.com/javase/6/docs/technotes/tools/solaris/keytool.html

•	KeyStore=MyChat.keystore
o	Set the optional keystore where the public/private keys are located to the MyChat.keystore file
•	KeyStorePassword=pass
o	Provide the password to access the keystore file.  If a keystore is provided, and a keystore password is not, then the program will request the password.
•	TrustStore=MyChat.truststore
o	Set the optional truststore where the public keys are located to the MyChat.truststore file.
•	TrustStorePassword=word
o	Provide the password to access the truststore file.  If a truststore is provided, and a truststore password is not, then the program will request the password.

COMPILE AND RUN

Before compiling or running, ensure that the java/bin directory is in you systems PATH, unless you want to do things the long way. :-).  See http://java.sun.com/docs/books/tutorial/essential/environment/paths.html for information on how to do this.

To compile into bytecode:

Browse to the directory of the source code and type…
javac MyChatSSL.java

To run the bytecode:

	Browse to the directory where the bytecode is and type…
java MyChatSSL

To run the bytecode with SSL debug on:

	Browse to the directory where the bytecode is and type…
	java -Djavax.net.debug=ssl MyChatSSL

To run the jar file (Note: To run the jar file download, you will need Java 6.):

	Browse to the directory where the .jar file is located and type or double click…
java –jar MyChatSSL.jar

That should be about it.  If you have any questions, comments, or problems, or anything else you what to mention you can contact me at rbarham1980@cox.net.