Skip to content

Farzync/secure-console-messaging-app

Repository files navigation

πŸ” Secure Messaging App

A terminal-based chat application with end-to-end encryption for secure communication.

License Version

πŸ“ Description

Secure Messaging App is a lightweight, terminal-based chat application that prioritizes privacy through end-to-end encryption. Built with NodeJS and TypeScript, this application offers secure communication over insecure networks through a combination of RSA and AES-GCM encryption techniques.

✨ Features

  • πŸ”’ End-to-End Encryption using RSA + AES-GCM
  • πŸ’» Terminal-based user interface
  • 🌐 Client-server architecture
  • πŸ“± Cross-platform compatibility (Windows, Linux)
  • πŸš€ Executable builds for easy distribution
  • 🧡 Lightweight with minimal dependencies

πŸ”§ Technologies

  • TypeScript: For type-safe development
  • Node.js: JavaScript runtime
  • Crypto: Node.js built-in crypto module for encryption
  • esbuild: For bundling the application
  • pkg: For creating standalone executables

πŸ“‹ Prerequisites

  • Node.js (v16 or higher)
  • npm (v7 or higher)

πŸš€ Installation

Clone the repository

git clone https://github.com/Farzync/secure-console-messaging-app.git
cd secure-console-messaging-app

Install dependencies

npm install

πŸ’» Usage

Development mode

Start the server:

npm run dev:server

In a separate terminal, start the client:

npm run dev:client

Production mode

Build the application:

npm run build

Start the server:

npm run start:server

Start the client:

npm run start:client

Build executables

Build executables for both Windows and Linux:

npm run build:all

The executables will be available in the build/server and build/client directories.

πŸ” Security Features

Encryption Protocol

This application implements a two-layer encryption protocol:

  1. RSA Key Exchange: Used for initial handshake and secure exchange of AES keys
  2. AES-GCM: Used for encrypting the actual message content with perfect forward secrecy

Security Best Practices

  • No plaintext message storage
  • Zero trust architecture
  • Perfect forward secrecy
  • Ephemeral key generation
  • Message authentication via GCM

πŸ“ Project Structure

secure-messaging-app/
β”‚   .gitignore
β”‚   LICENSE
β”‚   package-lock.json
β”‚   package.json
β”‚   README.md
β”‚   tsconfig.json
β”‚
└───src
    β”œβ”€β”€β”€build
    β”‚       client.js
    β”‚       server.js
    β”‚
    β”œβ”€β”€β”€client
    β”‚   β”‚   index.ts
    β”‚   β”‚   messagingClient.ts
    β”‚   β”‚   types.ts
    β”‚   β”‚
    β”‚   └───utils
    β”‚           connection.ts
    β”‚           encryption.ts
    β”‚           prompt.ts
    β”‚           timestamp.ts
    β”‚
    └───server
        β”‚   index.ts
        β”‚   messagingServer.ts
        β”‚   types.ts
        β”‚
        └───utils
                encryption.ts
                port.ts
                prompt.ts
                timestamp.ts

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘€ Author

Faeza Raziq


Made with paranoia and love by Faeza Raziq.