Skip to content

priyansh-dimri/encra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encra: Advanced Secure Messaging Platform

Encra is a cutting-edge end-to-end encrypted messaging application that leverages state-of-the-art post-quantum cryptographic techniques to ensure confidentiality and integrity.


Table of Contents


Overview

Encra is a messaging platform that combines real-time communication with next-generation cryptography. The application uses post-quantum key exchange algorithms to establish secure communication channels, while leveraging AES-256 encryption for message confidentiality. With real-time messaging powered by Socket.IO and a responsive UI built using MUI, Encra is engineered to be secure, performant, and user-friendly.


Demo

Watch a quick demo of Encra in action:

Encra Demo


Tech Stack

  • Frontend:

    • React (Vite) — a modern, fast, and efficient framework for building user interfaces.
    • MUI — a comprehensive React UI library for building responsive and accessible UIs.
    • Socket.IO Client — enabling real-time communication.
    • @noble/post-quantum — cutting-edge post-quantum cryptography for future-proof encryption.
  • Backend:

    • Node.js & Express.js — a fast, scalable backend for handling requests and APIs.
    • Socket.IO Server — for real-time, low-latency communication.
    • MongoDB with Mongoose — scalable, NoSQL database for handling user data.
    • JSON Web Tokens (JWT) — secure, stateless session management.
    • Argon2 — state-of-the-art password hashing algorithm for secure authentication.
    • @noble/post-quantum — advanced cryptographic algorithms for post-quantum security.
    • dotenv, cors — for environment configuration and cross-origin resource sharing.

Key Features

  1. User Authentication & Authorization:

    • Registration, login, and logout managed through JWT for stateless authentication..
    • Secure password hashing using Argon2 ensuring protection against modern threats.
  2. Post-Quantum Key Exchange & Encryption:

    • Use of @noble/post-quantum for PQC-based key exchange, making it quantum-resistant.
    • Symmetric encryption of messages using AES-256, one of the most secure algorithms available.
    • Digital signatures for ensuring message integrity and authenticity, ensuring that the communication is tamper-proof.
  3. Real-Time Messaging:

    • Socket.IO-powered messaging for instantaneous communication.
    • End-to-end encryption ensures that messages are never exposed in plaintext.

Security & Cryptography

Encra is built with a security-first mindset:

  • Post-Quantum Cryptography: Utilizes advanced PQC algorithms via @noble/post-quantum for key encapsulation.
  • Hybrid Encryption Model: Establishes a shared symmetric key using PQC, then uses AES-256 for rapid encryption/decryption.
  • JWT-Based Session Management: Implements secure token mechanisms with short expiration and refresh token capabilities.
  • Robust Authentication: Passwords are securely hashed and sensitive data is protected at rest and in transit.

Installation & Setup

Prerequisites

  • Node.js v14+ and npm
  • MongoDB instance (local/cloud)

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/priyansh-dimri/encra.git
    cd encra
  2. Setup Frontend:

    cd encra-client
    npm install
  3. Setup Backend:

    cd ../encra-server
    npm install
  4. Environment Configuration:

    • Create a .env file in encra-server with the following variables:
     PORT=5000
     MONGODB_URI=your_mongodb_connection_string
     JWT_SECRET=your_jwt_secret
  5. Run the Application:

    • Backend:

      npm run dev
    • Frontend:

      cd ../encra-client
      npm run dev
  6. Access the Application:

    • Open your browser to the URL provided by Vite.

Usage

  • User Flow:

    • Registration & Login: Securely create an account and log in, with JWT managing session authenticity.
    • Start a Chat: Initiate a conversation, triggering post-quantum key exchange and secure message transmission.
    • Message Security: All messages are encrypted using a hybrid modelPQC for key exchange and AES-256 for message encryption.
  • Administration:

    • Use the provided API endpoints to manage users, verify encryption logs, and monitor communication events.

Contributing

We encourage high-quality contributions to enhance the scalability and security of Encra. Please submit well-tested pull requests for bug fixes, features, or improvements. For major updates, open an issue to discuss proposed changes before submitting a pull request.


License

This project is licensed under the MIT License.


We welcome any contributions or feedback to improve the platform.

Contributors