Code Monkey home page Code Monkey logo

webappchat's Introduction

WebChat – Secure Chat Application

WebChat is a real-time chat application designed with a strong emphasis on user privacy and data protection. Utilizing double encryption, WebChat ensures that your messages are always kept away from prying eyes. Table of Contents

Features

Real-Time Chat: Seamless real-time messaging to keep you connected with your peers.

File Sharing: Share documents and media files with complete peace of mind.

Client-Server Architecture: Ensures fast message delivery without compromising on security.

Intuitive User Interface: A user-friendly design to make your chat experience smooth.

Double Encryption

WebChat prioritizes security by using a double encryption mechanism. This provides an additional layer of protection, ensuring that even if one encryption method is compromised, the data remains protected by the second encryption layer. How Double Encryption Works

At a high level, double encryption involves:

First Layer of Encryption: The initial data is encrypted using the first encryption algorithm, producing an intermediary encrypted result.

Second Layer of Encryption: This intermediary encrypted result is then encrypted again using a second, different encryption algorithm.

To decrypt the data, the process is simply reversed: The data is first decrypted using the second encryption algorithm, and then again using the first. Benefits of Double Encryption

Enhanced Security: Even if an attacker manages to break one encryption layer, the data remains secure behind the second layer.

Mitigate Risks: In the case of any vulnerabilities found in one encryption algorithm, the data is still protected by the second encryption method.

Increase Difficulty for Brute Force Attacks: Double encryption considerably increases the computational power and time required to perform brute force attacks.

Encryption Algorithms Used

First Layer: AES (Advanced Encryption Standard) – A symmetric encryption algorithm that's widely recognized for its robustness and speed. It uses block ciphers to encrypt and decrypt data in blocks.

Second Layer: RSA (Rivest–Shamir–Adleman) – An asymmetric encryption algorithm. It uses a pair of keys: a public key, which encrypts data, and a private key, which decrypts data. This ensures that even if the public key is known, the data cannot be decrypted without the private key.

Why Double and Not Single Encryption?

While single encryption might be sufficient for many applications, double encryption is chosen for scenarios where data sensitivity is extremely high, or where regulatory or compliance demands dictate stronger data protection. By using two distinct encryption methods, we ensure that the vulnerabilities or weaknesses of one method are offset by the strengths of the other. Considerations

Performance: Double encryption requires more computational resources than single encryption. However, for applications where security is paramount, this trade-off is often deemed acceptable.

Key Management: Properly managing and storing the encryption keys is crucial. Losing access to the keys, especially with RSA's private key, means data can become irretrievable.

Getting Started

Clone the repository:

git clone https://github.com/ishaiva/webappchat.git

Navigate into the project directory:

cd webchat

Install the required packages:

pip install -r requirements.txt

setup keys

sudo python3 setup.py

setup_Screenshot

Configuration for Deployment

Before running the application, you'll need to configure a few settings to make it compatible with your environment.

  1. Set Server IP Address and Port

Both the application server and the client-side JavaScript need to know where your server is running. Python App Configuration:

In app.py (or wherever your main application file is located), look for a line similar to:

python

socketio.run(app, host='192.168.x.x', port=5000)

Replace '192.168.x.x' with your server's IP address and 5000 with your desired port if different. Client-side JavaScript Configuration:

In static/script.js, locate a line similar to:

javascript

var socket = io.connect('http://192.168.x.x:5000/');

Replace 'http://192.168.x.x:5000/' with the correct server IP and port in the format 'http://[YOUR_SERVER_IP]:[YOUR_PORT]/'.

  1. Ensure Port Availability

Make sure the port you've chosen (e.g., 5000 in the example) is open and available on your server, and there's no firewall blocking incoming/outgoing requests to that port.

Run the application:

sudo python3 app.py

app_Screenshot_in_ter

Usage

Open a web browser and navigate to https://192.168.x.x:5000. Enter a nickname and start chatting. You can also share files and view your connection statistics.

webappGUIScreenshot

Contributing

Contributions, issues, and feature requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License MIT

This project is licensed under the MIT License. Copyright 2023 ishaiva

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE.

webappchat's People

Contributors

ishaiva avatar

Stargazers

 avatar  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.