rachel5wu/MiniRSA_Chat
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
*********NAME : Weizhuo Wu, Swati Goswami******** *****************GIT REPOSITORY****************** http://github.com/weizhuo/MiniRSA_Chat *******************APPROACH********************** while server and client build their connection, they exchange their public key. When they write message to each other, first encode it using friend's public key and send out. When they receive the encoded message, they decoded it using his own private key. If any one say "quit", it will put the flag in thread argument to 0 so that it can inform the read thread to exit. If any one receive "quit", read thread will make the flag in thread arguments to 0 so write thread can quit. The coprime numbers are generated in the range of 100000. Makefile: 1.to compile the code: type make build. 2. to run: type "make run_server" for server type "make run_client" for client type "make run_crackKey" for cracking key. 3. make clean to delete object files. *****************SAMPLE RUNS****************** ********************SERVER********************* weizhuo@QUIDDITY:/mnt/castor/seas_home/w/weizhuo/595workspace/RSAchat> valgrind --tool=helgrind s 12345 2 4 ==30960== Helgrind, a thread error detector ==30960== Copyright (C) 2007-2010, and GNU GPL'd, by OpenWorks LLP et al. ==30960== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==30960== Command: s 12345 2 4 ==30960== My public key: 313 551 My private key: 409, 551 Friends' public key : 383 2021 Me: Friend: 365 15 504 115 301 356 261 15 hi swati Friend: 301 365 541 431 504 266 504 301 365 541 171 541 504 301 541 504 535 541 541 261 504 when & where we meet i am at 207 now, is 10am ok? 1406 1145 747 1393 1145 747 528 1145 1499 330 1152 1145 357 153 835 1979 1145 1406 1912 1145 1842 330 747 1393 1145 153 1208 1015 Me: Friend: 254 541 356 365 503 504 36 430 yeah, ok ok, c u in lab 153 1208 1979 1145 934 1145 1342 1145 1406 357 1145 168 747 34 Me: Friend: 36 430 503 504 254 261 ok, yt Friend: 420 254 541 bye Friend: 18 59 15 261 quit ==30960== ==30960== For counts of detected and suppressed errors, rerun with: -v ==30960== Use --history-level=approx or =none to gain increased speed, at ==30960== the cost of reduced accuracy of conflicting-access information ==30960== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 424 from 74) weizhuo@QUIDDITY:/mnt/castor/seas_home/w/weizhuo/595workspace/RSAchat> ^C *****************CLIENT******************** weizhuo@QUIDDITY:/mnt/castor/seas_home/w/weizhuo/595workspace/RSAchat> valgrind --tool=helgrind c 12345 QUIDDITY 9 8 ==30961== Helgrind, a thread error detector ==30961== Copyright (C) 2007-2010, and GNU GPL'd, by OpenWorks LLP et al. ==30961== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==30961== Command: c 12345 QUIDDITY 9 8 ==30961== My public key: 383 2021 My private key: 227, 2021 Friends' public key : 313 551 Me: hi swati 365 15 504 115 301 356 261 15 Me: when & where we meet 301 365 541 431 504 266 504 301 365 541 171 541 504 301 541 504 535 541 541 261 504 Me: Friend: 1406 1145 747 1393 1145 747 528 1145 1499 330 1152 1145 357 153 835 1979 1145 1406 1912 1145 1842 330 747 1393 1145 153 1208 1015 i am at 207 now, is 10am ok? yeah, ok 254 541 356 365 503 504 36 430 Me: Friend: 153 1208 1979 1145 934 1145 1342 1145 1406 357 1145 168 747 34 ok, c u in lab ok, yt 36 430 503 504 254 261 Me: bye 420 254 541 Me: quit 18 59 15 261 ==30961== ==30961== For counts of detected and suppressed errors, rerun with: -v ==30961== Use --history-level=approx or =none to gain increased speed, at ==30961== the cost of reduced accuracy of conflicting-access information ==30961== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 341 from 70) weizhuo@QUIDDITY:/mnt/castor/seas_home/w/weizhuo/595workspace/RSAchat> ************************************** **************BruteForce************** 1. The user will be prompted for the public keys, the product of prime numbers first and then the public key exponent. 2. If the keys doesnt adhere to the requirements of the RSA algorithm , an error message will be displayed. 3. After the keys have been cracked and the private key is displayed, you can use this code to encrypt and decrypt characters. You will be prompted for appropriate options. For your convenience, sample runs have been included. Note: The github repository has been updated from Wu's account primarily because we worked together most of the time.
About
a chat server and client system which implements a subset of the RSA cryptosystem
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published