Skip to content

πŸ” A client-server chat application between 2 parties to securely share information with each other via an encrypted channel with RSA algorithm.

License

Notifications You must be signed in to change notification settings

EslamAsHhraf/RSA-Crypto-Chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” RSA

"Protect yourself from hacker attacking. πŸ‘¨β€πŸ’»"


πŸ“ Table of Contents


πŸ“™ Overview

  • The RSA algorithm (Rivest-Shamir-Adleman) is the basis of a cryptosystem -- a suite of cryptographic algorithms that are used for specific security services or purposes -- which enables public key encryption and is widely used to secure sensitive data, particularly when it is being sent over an insecure network such as the internet.
  • How does the RSA algorithm work?

    • Alice generates her RSA keys by selecting two primes: p=11 and q=13. The modulus is n=p*q=143. The totient is n Ο•(n)=(pβˆ’1)x(qβˆ’1)=120. She chooses 7 for her RSA public key e and calculates her RSA private key using the Extended Euclidean algorithm, which gives her 103
    • Bob wants to send Alice an encrypted message, M, so he obtains her RSA public key (n, e) which, in this example, is (143, 7). His plaintext message is just the number 9 and is encrypted into ciphertext, C, as follows
      • M^e mod n = 9^7mod 143 = 48 = C
    • When Alice receives Bob's message, she decrypts it by using her RSA private key (d, n) as follows:
      • C^d mod n = 48^103 mod 143 = 9 = M
  • Requirements
  • Built using Python

πŸš€ Get Started

  • Navigate to the src directory
cd src
  • To start chatting

    • Run the server.py file
    • Run the client.py file
  • Run the attack.py file to get how size of input affect Time of encryption and decryption

  • Run the speed_encryption_decryption.py file to get how size of input affect Time of encryption and decryption



πŸ“‰ Encryption/Decryption Analysis

Graph Analysis
Key size doesn’t affect Time of encryption and decryption [time almost zero] because algorithm has simple operations like addition and power …etc
Time increases exponentially by increasing number of bits

πŸ‘‘ Contributors



Eslam Ashraf


πŸ”’ License

Note: This software is licensed under MIT License, See License for more information Β©EslamAsHhraf.

About

πŸ” A client-server chat application between 2 parties to securely share information with each other via an encrypted channel with RSA algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages