Giter Site home page Giter Site logo

eslamashhraf / rsa-crypto-chat Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 564 KB

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

License: MIT License

Python 100.00%
analytics attack chatting cmp-2024 description encryption mapping rsa-cryptography security python

rsa-crypto-chat's Introduction

πŸ” 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.

rsa-crypto-chat's People

Contributors

eslamashhraf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.