pqasyncsecure
v1.0.0
Published
A lightweight JavaScript library for secure message encryption using **Post-Quantum Cryptography (PQC)** + **Classical Cryptography**. Designed to simulate the cryptographic core of a future-proof messaging application that remains secure even in the age
Readme
🛡️ PQChatSecure
A lightweight JavaScript library for secure message encryption using Post-Quantum Cryptography (PQC) + Classical Cryptography. Designed to simulate the cryptographic core of a future-proof messaging application that remains secure even in the age of quantum computing.
✨ Features
- 🔐 Hybrid Key Exchange using:
- Kyber-768 (Post-Quantum Secure)
- X25519 (Classical ECC)
- 🧠 SHA-256 Hashing for secure shared key derivation
- 📡 One-time Prekeys for asynchronous key exchanges (like Signal)
- 🔒 Authenticated Encryption with NaCl's SecretBox (XSalsa20 + Poly1305)
- 📊 Benchmark Tool to compare PQ performance with classical approaches
🧪 How It Works
Identity Key Generation
Each user generates a hybrid key (Kyber + X25519).Prekey Creation
A user generates one-time-use prekeys to be shared with others.Hybrid Key Exchange
One user uses a prekey to derive a shared symmetric key via:- Kyber KEM (quantum-safe)
- X25519 ECDH (classical)
- Combined using SHA-256
Message Encryption & Decryption
Messages are encrypted using NaCl’ssecretbox()and securely decrypted.
🚀 Quick Start
