SlideShare a Scribd company logo
1 of 11
Download to read offline
Hybrid P2P Online
Chatting App
CIS533 Liyuan Liu
Jerry
What’s Hybrid Peer-to-Peer?
Server
Client Jerry Client Carl
Motivation and Function(provide 17 commands for user,18 functions,for MAC OS version):
1,Privacy:
/leave
/unleave
/black Carl
/unback Carl
/hide
/unhide
/busy
/unbusy
2,Safety : RSA encryption(compare with QQ)
/lock
/unlock
/update
3,Stability: Its structure.
Some basic functions:
/register
/login
/logout
/send Carl
/close Carl
/check
Problems:It can
1, protect user’s msg and privacy
2,reduce server’s burden
3,guarantee user’s conversation won’t be
interrupted by server
Basic Function
./server
./client /register
input username
input passcode twice
complex and encrypt them with server’s public key
send to server and wait for reply(set up listen)
generate random ticket ,RSA key,random complex string
head real_pass len of complex
or ./client /login
len of real pass pass name(Jerry) Jerry’s public key encrypted ticket
random request type len
connect to server and recv server’s public key
on client side
On server side
accept a connect from Jerry
send Jerry server’s public key
recv Jerry’s msg(encrypted)
decrypt msg, check it(whether pass is right,whether
user name has existed,IP is right) and store it,update
it(IP,Public Key,status)
give feedback to client(success or failure)
IP,user name,passcode,public key,ticket, status(4),
IP_isolate(2),socket_fd
random request_type len type(success or failure)
status->online,IP_isolate->UNLOCK
command send to server
/logout
/leave
/unleave
/hide
/unhide
/busy
/unbusy
/lock
/unlock
input command
send to server(or other clients) and wait for the reply
recv msg and show user the corresponding msg
on client side
head user name another user name new public key(NULL,unless it is /update)
random request type len
/check
/send Carl
/update
if it’s /update,generate new RSA key
on server side
recv msg from Jerry
check req type and do corresponding action
/logout ->status(USER_LOGOUT)
/leave ->status(USER_LEAVE)
/unleave ->status(ONLINE)
/hide ->status(HIDE)
/unhide ->status(ONLINE)
/busy ->status(BUSY)
/unbusy ->status(ONLINE)
/lock->IP_isolate(UNLOCK)
/unlock->IP_isolate(UNLOCK)
give feedback to Jerry
random req_type len type(success or failure)
/check ->reply with user list
/update->store new public key
send Carl->reply with Carl’s ticket and IP and public key(encrypted with Jerry’s Key)
head user 1,user 2,user3….the num of users
head Carl’s name Carl’s IP
reply with this msg
Carl’s Public key Carl’s ticket
Command send to another client(Carl)
•
/update
/close Carl
/black Carl
/unblack Carl
/logout
generate new RSA key
send to another client
input command
input command
head new public key
send to another client
input command
remove Carl from black list
random request type len my user name(Jerry)
Command send to another client(Carl)
/send carl input command
send to server and wait for reply
recv msg and decrypt it
use carl’s public to encrypt auth info
send auth info to Carl and wait for reply
if Carl agrees with your connect request, store Carl’s info
head Jerry’s public key my user name(Jerry) Carl’s ticket(encrypted by Carl’s public key)
send authentication information to Carl
start to talk(check Carl’s status)
random request_type len
send Carl the talking msg
my user name(Jerry) talking msg(encrypted )
Store:Carl’s name
Carl’s status
Carl’s IP
Carl’s public key
Carl’s socket fd
On Carl’s side
recv connect request from Jerry
decrypt msg,check Jerry’s ticket
check whether Jerry in Carl’s black list
send feedback to Jerry
random request type len Carl’s public key typeCarl’s name
feedback
/send Jerry input command
check Jerry’s status
if connect,Carl can talk to Jerry now
hybrid P2P online chatting App

More Related Content

Similar to hybrid P2P online chatting App

Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network IssuesApcera
 
Adventures in Underland: Is encryption solid as a rock or a handful of dust?
Adventures in Underland: Is encryption solid as a rock or a handful of dust?Adventures in Underland: Is encryption solid as a rock or a handful of dust?
Adventures in Underland: Is encryption solid as a rock or a handful of dust?Paula Januszkiewicz
 
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP  #inc.pdfCODE FOR echo_client.c A simple echo client using TCP  #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP #inc.pdfsecunderbadtirumalgi
 
Secure shell(ssh) AND telnet AND CONSOLE
Secure shell(ssh)  AND telnet AND CONSOLESecure shell(ssh)  AND telnet AND CONSOLE
Secure shell(ssh) AND telnet AND CONSOLEAmiraMohamedGalal
 
Implement the following in my java program which is written under the.docx
Implement the following in my java program which is written under the.docxImplement the following in my java program which is written under the.docx
Implement the following in my java program which is written under the.docxBlake0FxCampbelld
 
Hacking and Computer Forensics
Hacking and Computer ForensicsHacking and Computer Forensics
Hacking and Computer ForensicsKristian Arjianto
 
Understanding Active Directory Enumeration
Understanding Active Directory EnumerationUnderstanding Active Directory Enumeration
Understanding Active Directory EnumerationDaniel López Jiménez
 
Code Red Security
Code Red SecurityCode Red Security
Code Red SecurityAmr Ali
 
PROJECT REPORT ON CRYPTOGRAPHIC ALGORITHM
PROJECT REPORT ON CRYPTOGRAPHIC ALGORITHMPROJECT REPORT ON CRYPTOGRAPHIC ALGORITHM
PROJECT REPORT ON CRYPTOGRAPHIC ALGORITHMsaniacorreya
 
Fundamental of Secure Socket Layer (SSL) | Part - 2
Fundamental of Secure Socket Layer (SSL) | Part - 2 Fundamental of Secure Socket Layer (SSL) | Part - 2
Fundamental of Secure Socket Layer (SSL) | Part - 2 Vishal Kumar
 

Similar to hybrid P2P online chatting App (14)

Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network Issues
 
Adventures in Underland: Is encryption solid as a rock or a handful of dust?
Adventures in Underland: Is encryption solid as a rock or a handful of dust?Adventures in Underland: Is encryption solid as a rock or a handful of dust?
Adventures in Underland: Is encryption solid as a rock or a handful of dust?
 
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP  #inc.pdfCODE FOR echo_client.c A simple echo client using TCP  #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
 
Api doc
Api docApi doc
Api doc
 
Secure shell(ssh) AND telnet AND CONSOLE
Secure shell(ssh)  AND telnet AND CONSOLESecure shell(ssh)  AND telnet AND CONSOLE
Secure shell(ssh) AND telnet AND CONSOLE
 
Implement the following in my java program which is written under the.docx
Implement the following in my java program which is written under the.docxImplement the following in my java program which is written under the.docx
Implement the following in my java program which is written under the.docx
 
802.1x
802.1x802.1x
802.1x
 
Hacking and Computer Forensics
Hacking and Computer ForensicsHacking and Computer Forensics
Hacking and Computer Forensics
 
Understanding Active Directory Enumeration
Understanding Active Directory EnumerationUnderstanding Active Directory Enumeration
Understanding Active Directory Enumeration
 
Code Red Security
Code Red SecurityCode Red Security
Code Red Security
 
PROJECT REPORT ON CRYPTOGRAPHIC ALGORITHM
PROJECT REPORT ON CRYPTOGRAPHIC ALGORITHMPROJECT REPORT ON CRYPTOGRAPHIC ALGORITHM
PROJECT REPORT ON CRYPTOGRAPHIC ALGORITHM
 
Fundamental of Secure Socket Layer (SSL) | Part - 2
Fundamental of Secure Socket Layer (SSL) | Part - 2 Fundamental of Secure Socket Layer (SSL) | Part - 2
Fundamental of Secure Socket Layer (SSL) | Part - 2
 
Stu t17 a
Stu t17 aStu t17 a
Stu t17 a
 
Fail2ban
Fail2banFail2ban
Fail2ban
 

hybrid P2P online chatting App

  • 1. Hybrid P2P Online Chatting App CIS533 Liyuan Liu Jerry
  • 3. Motivation and Function(provide 17 commands for user,18 functions,for MAC OS version): 1,Privacy: /leave /unleave /black Carl /unback Carl /hide /unhide /busy /unbusy 2,Safety : RSA encryption(compare with QQ) /lock /unlock /update 3,Stability: Its structure. Some basic functions: /register /login /logout /send Carl /close Carl /check Problems:It can 1, protect user’s msg and privacy 2,reduce server’s burden 3,guarantee user’s conversation won’t be interrupted by server
  • 4. Basic Function ./server ./client /register input username input passcode twice complex and encrypt them with server’s public key send to server and wait for reply(set up listen) generate random ticket ,RSA key,random complex string head real_pass len of complex or ./client /login len of real pass pass name(Jerry) Jerry’s public key encrypted ticket random request type len connect to server and recv server’s public key on client side
  • 5. On server side accept a connect from Jerry send Jerry server’s public key recv Jerry’s msg(encrypted) decrypt msg, check it(whether pass is right,whether user name has existed,IP is right) and store it,update it(IP,Public Key,status) give feedback to client(success or failure) IP,user name,passcode,public key,ticket, status(4), IP_isolate(2),socket_fd random request_type len type(success or failure) status->online,IP_isolate->UNLOCK
  • 6. command send to server /logout /leave /unleave /hide /unhide /busy /unbusy /lock /unlock input command send to server(or other clients) and wait for the reply recv msg and show user the corresponding msg on client side head user name another user name new public key(NULL,unless it is /update) random request type len /check /send Carl /update if it’s /update,generate new RSA key
  • 7. on server side recv msg from Jerry check req type and do corresponding action /logout ->status(USER_LOGOUT) /leave ->status(USER_LEAVE) /unleave ->status(ONLINE) /hide ->status(HIDE) /unhide ->status(ONLINE) /busy ->status(BUSY) /unbusy ->status(ONLINE) /lock->IP_isolate(UNLOCK) /unlock->IP_isolate(UNLOCK) give feedback to Jerry random req_type len type(success or failure) /check ->reply with user list /update->store new public key send Carl->reply with Carl’s ticket and IP and public key(encrypted with Jerry’s Key) head user 1,user 2,user3….the num of users head Carl’s name Carl’s IP reply with this msg Carl’s Public key Carl’s ticket
  • 8. Command send to another client(Carl) • /update /close Carl /black Carl /unblack Carl /logout generate new RSA key send to another client input command input command head new public key send to another client input command remove Carl from black list random request type len my user name(Jerry)
  • 9. Command send to another client(Carl) /send carl input command send to server and wait for reply recv msg and decrypt it use carl’s public to encrypt auth info send auth info to Carl and wait for reply if Carl agrees with your connect request, store Carl’s info head Jerry’s public key my user name(Jerry) Carl’s ticket(encrypted by Carl’s public key) send authentication information to Carl start to talk(check Carl’s status) random request_type len send Carl the talking msg my user name(Jerry) talking msg(encrypted ) Store:Carl’s name Carl’s status Carl’s IP Carl’s public key Carl’s socket fd
  • 10. On Carl’s side recv connect request from Jerry decrypt msg,check Jerry’s ticket check whether Jerry in Carl’s black list send feedback to Jerry random request type len Carl’s public key typeCarl’s name feedback /send Jerry input command check Jerry’s status if connect,Carl can talk to Jerry now