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.
- Overview
- Tech Stack
- Key Features
- Security & Cryptography
- Installation & Setup
- Usage
- Contributing
- License
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.
Watch a quick demo of Encra in action:
-
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.
-
User Authentication & Authorization:
- Registration, login, and logout managed through JWT for stateless authentication..
- Secure password hashing using Argon2 ensuring protection against modern threats.
-
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.
-
Real-Time Messaging:
- Socket.IO-powered messaging for instantaneous communication.
- End-to-end encryption ensures that messages are never exposed in plaintext.
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.
- Node.js v14+ and npm
- MongoDB instance (local/cloud)
-
Clone the Repository:
git clone https://github.com/priyansh-dimri/encra.git cd encra -
Setup Frontend:
cd encra-client npm install -
Setup Backend:
cd ../encra-server npm install -
Environment Configuration:
- Create a
.envfile inencra-serverwith the following variables:
PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
- Create a
-
Run the Application:
-
Backend:
npm run dev
-
Frontend:
cd ../encra-client npm run dev
-
-
Access the Application:
- Open your browser to the URL provided by Vite.
-
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 model—PQC 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.
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.
This project is licensed under the MIT License.
We welcome any contributions or feedback to improve the platform.
