Skip to content

devdeep2003/Cryptographic-Hashing-using-RSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” RSA Crypto Playground

A simple Node.js + Express application that demonstrates RSA encryption and decryption using Node’s built-in crypto module.

Users can provide custom input and get back its encrypted or decrypted output using generated RSA key pairs.

πŸš€ Features

Generate RSA public/private key pairs

Encrypt text using the public key

Decrypt text using the private key

Lightweight Express API

πŸ“‚ Project Structure rsa-crypto-playground/ │── server.js # Main entry point (Express server) │── package.json # Dependencies and scripts

πŸ› οΈ Installation

Clone the repository:

git clone https://github.com/your-username/rsa-crypto-playground.git cd rsa-crypto-playground

Install dependencies:

npm install

Start the server:

npm start

Server runs at: πŸ‘‰ http://localhost:5000

πŸ“‘ API Usage πŸ”‘ Encrypt Text

POST /encrypt

{ "text": "HelloWorld" }

βœ… Response:

{ "encrypted": "MIGfMA0GCSqGSIb3DQEBA..." }

πŸ”“ Decrypt Text

POST /decrypt

{ "encrypted": "MIGfMA0GCSqGSIb3DQEBA..." }

βœ… Response:

{ "decrypted": "HelloWorld" }

βš™οΈ How It Works

On startup, the app generates a 2048-bit RSA key pair (public & private keys).

The public key is used to encrypt data.

The private key is used to decrypt the encrypted data.

πŸ§‘β€πŸ’» Tech Stack

Node.js

Express.js

Crypto

πŸ“„ License

MIT License

About

Cryptographic Hashing using RSA displaying Private Key , Public Key , Encrypted and Decrypted Message

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published