ABSTRACT
This Secure Chat Program is a prototype design developed in order to provide secure communication for the employees with in the organisation. This is implemented by using Java Secure Socket Extension (JSSE) which works on TLS protocol which is considered as the latest version of SSL. The Authentication is provided by implementing Certificate Authority (CA). Some of the major features of the application are:
- Encryption/Decryption due to which the messages are not transferred in plain text over a network. So that an intruder cannot view the messages.
- Integrity of the messages is provided, to confirm weather the messages are received exactly and it is not altered by the intruder.
- Authentication of the messages is provided to know weather the message has been sent by the genuine user
Key words:
Authentication, Integrity, Encryption/Decryption, Intruder
ACKNOWLEDGMENT
I would like to thank all the people who have helped me in every possible way to complete this project.
I would like to express my gratitude to my project supervisor Dr. Krishan, for his endless contribution of time, effort and guidance. But for valuable advices, developing this project would not have been possible.
I would also like to thank all the CMS Lab staff members, for providing me immense help for the development of this project. Last but not the least, I would like to thank my family and friends, who have been a driving force throughout the development of this project work.
I would specially thank my parents who have always been there for me. You are the best parents a person could have.
Table of Contents:
1. INTRODUCTION.. 9
1.1 Classification of messengers. 10
1.2 Background. 10
1.3 Advantages and disadvantages of IM… 11
1.4 Proposed Solution. 11
2. LITERATURE REVIEW… 11
2.1 Cryptography. 12
2.2 Symmetric or Private Key Cryptography. 13
Advantages and Disadvantages of Symmetric Cryptography. 13
2.2.2 RC4. 14
2.2.3 DES. 14
2.2.4 TrippleDES. 15
2.2.5 INTERNATIONAL DATA ENCRYPTION ALGORITHM (IDEA). 15
2.2.6 AES. 16
2.3 Asymmetric or Public Key Cryptography. 16
2.3.1 Advantages and Disadvantages of Asymmetric or Public Key Cryptography. 17
2.3.2 Digital Signature Algorithm (DSA). 17
2.3.3 Ron Rivest, Adi Shamir and Len Adleman (RSA). 18
2.3.4 Deffi Hellman Key Exchange Algorithm.. 20
2.3 Hashing Algorithms. 21
2.3.1 MD5. 22
2.3.2 SHA.. 23
2.3.2 Hashed Message Authentication Code (HMAC). 23
2.4 Certificate Authority. 23
2.4 1 Standard for digital signature certificates X.509. 25
2.5 SOCKET.. 25
2.6 Analysis of Java Cryptography. 26
2.6.1 Introduction to JCA.. 27
2.6.2 JAVA Cryptographic Extension. 28
2.6.3 JAVA SECURE SOCKET EXTENSION.. 29
2.7 Block Ciphers. 30
3. SYSTEM ANALYSIS AND DESIGN.. 32
3.1 System Requirements: 32
3.1.1 Hardware Requirements. 32
3.1.2 Software Requirements. 32
3.1.3 Other Tools. 32
3.2 Requirement Specification. 33
3.3 Technology Requirements. 33
3.4.1 Encryption/Decryption. 33
3.4.2 Authentication. 34
3.4.3 Integrity. 34
3.4.4 Exchange messages using TLSv1 protocol 34
3.4.5 Users should communicate messages using user interface. 34
3.5 SYSTEM DESIGN.. 34
3.5.1 UML Class Diagrams. 35
4. IMPLEMENTATION.. 37
4.1 CLIENT MODULE.. 38
4.2 SERVER MODULE.. 38
4.3 THREADS CREATED BY CLIENT AND SERVER AT THEIR ENDS. 38
4.4 STEPS IN TLS (SSL v 3.3 is indicated as TLS) HANDSHAKE.. 39
4.5 Core Implementation of the application. 49
4.5.1 KEY Classes. 52
4.6 CERTIFICATES Generation. 52
4.7 Final Output of the prototype System.. 59
5. APPLICATION TESTING.. 66
6. CONCLUSION AND FUTURE SCOPE.. 69
7. LEARNING OUTCOMES. 71
8. REFERENCES. 72
List of Tables
Table 1: Digest Performance in Megabytes per Second
Table 2: Comparison of different SHA algorithms based on different parameters
Table 3: Hardware Requirement
Table 4: Software Requirements
List of Figures
Figure 1: Basic model of the Network Communication
Figure 2: Basic Symmetric Key Cryptography
Figure 3: Encryption/Decryption Using RC4
Figure 4: Java Security Packages
Figure 5: Secure Client Socket Class Diagram
Figure 6: Secure Server Socket Class Diagram
Figure 7: Client Req Protocol Class Diagram
Figure 8: Client Window Class Diagram
Figure 9: Chat IO Class Diagram
Figure 10: Debug message showing Server Side “Client Hello Message”
Figure 11: Debug message showing Client Side “Client Hello Message”
Figure 12: “Server Hello “at Client Side
Figure 13: “Server Hello” at Server Side
Figure 14: “Certificate Chain” at Server Side
Figure 15: “Certificate Verification” at Client Side
Figure 16: “Certificate Request” from Server at Client Side
Figure 17: “Certificate Verification” at Server Side
Figure 18: Server Requesting Client Key Exchange
Figure 19: Client Sending the Key Exchange
Figure 20: “Server Hello Done”
Figure 21: “Certificate Request” from Server at Client Side
Figure 22: Client Key Exchange
Figure 23: Changing the Cipher Spec
Figure 24: Reading the Change Cipher Spec Command
Figure 25: Key Classes used
Figure 26: Requesting Certificate Step 1
Figure 27: Requesting Certificate Step 2
Figure 28: Requesting Certificate Step 3
Figure 29: Requesting Certificate Step 4
Figure 30: Requesting Certificate Step 5
Figure 31: Requesting Certificate Step 6
Figure 32: Issuing Certificate
Figure 33: Showing Pending Certificates
Figure 34: Showing Issued Certificates
Figure 35: public and private key pairs at the server side.
Figure 36: Connection Establishment
Figure 37: Server side window
Figure 38: Client side window
Figure 39: Message Exchange at Server Side
Figure 40: Server Encryption
Figure 41: Message Exchange at Client Side
Figure 42: Client Decryption
Figure 43: Integrity at Server Side
Figure 44: Integrity at Client Side
Figure 45: Test Case 2
Figure 46: Ethereal Testing In Wire Shark
This Project Paper is written & submitted by Deepak V.