An interactive web application for exploring various cryptographic operations with an intuitive user interface.
This project contains:
- Interactive Web UI with a modern, responsive design
- Hash Functions: SHA-256 hashing and salted password hashing
- HMAC: Hash-based Message Authentication Code
- Symmetric Encryption: AES-256 encryption and decryption
- Asymmetric Encryption: RSA encryption and decryption
- Quantum-Resistant Encryption: Crystals-Kyber (ML-KEM-768) post-quantum encryption
- Digital Signatures: RSA-SHA256 message signing and verification
- User Authentication: Signup and login with salted password hashing
- Chain Operations: Apply multiple cryptographic operations in sequence
- HTTP Server for serving the web application and API endpoints
- Clone the repository
- Install dependencies:
npm install - Start the server:
npm start - Open your browser to
http://localhost:3000
For detailed Crystals-Kyber usage examples, see examples/kyber-usage.md.
The application provides an intuitive web interface where you can:
- Enter a message in the input textarea
- Click any cryptography button to apply operations
- View results in the results section with proper formatting
- Chain operations using the preset chain buttons for complex workflows
- Copy results to clipboard for further use
- SHA-256 Hash: Generate a secure hash of your input
- Salted Hash: Create a salted hash for password storage
- HMAC: Generate Hash-based Message Authentication Code
- AES-256 Encryption/Decryption: Symmetric encryption with automatic key generation
- RSA Encryption/Decryption: Asymmetric encryption using generated key pairs
- Crystals-Kyber Encryption/Decryption: Post-quantum secure encryption using ML-KEM-768
- Digital Signatures: Sign messages and verify signatures
- User Authentication: Demonstrate secure signup/login flows
Combine multiple cryptographic operations:
- Hash → HMAC → Encrypt → Sign: Full security pipeline
- Hash → Symmetric Encrypt: Hash then encrypt the result
- Sign → Asymmetric Encrypt: Sign message then encrypt the signature
The application provides REST API endpoints for programmatic access:
POST /api/hash- SHA-256 hashingPOST /api/saltedHash- Generate salted hashPOST /api/hmac- Generate HMACPOST /api/symmetricEncrypt- AES-256 encryptionPOST /api/symmetricDecrypt- AES-256 decryptionPOST /api/asymmetricEncrypt- RSA encryptionPOST /api/asymmetricDecrypt- RSA decryptionPOST /api/kyberGenerateKeys- Generate Crystals-Kyber key pairPOST /api/kyberEncrypt- Quantum-resistant encryptionPOST /api/kyberDecrypt- Quantum-resistant decryptionPOST /api/kyberInfo- Get information about current Kyber keysPOST /api/sign- Digital signaturePOST /api/verify- Signature verificationPOST /api/signup- User registrationPOST /api/login- User authentication
This project now includes Crystals-Kyber (ML-KEM-768), a quantum-resistant encryption algorithm that is part of NIST's Post-Quantum Cryptography standardization (FIPS 203).
Traditional encryption methods like RSA and ECC are vulnerable to attacks from quantum computers. Crystals-Kyber provides:
- Post-Quantum Security: Resistant to attacks from both classical and quantum computers
- NIST Standardized: Part of the NIST Post-Quantum Cryptography standard (ML-KEM)
- High Performance: Fast key generation, encryption, and decryption
- Security Level 3: Equivalent to AES-192 security
// Generate Kyber key pair
const keys = await generateKyberKeyPair();
// Encrypt a message
const encrypted = await kyberEncrypt("Secret message");
// Returns: { encrypted, ciphertext, iv }
// Decrypt the message
const decrypted = await kyberDecrypt(encrypted.encrypted, encrypted.ciphertext, encrypted.iv);
// Returns: "Secret message"- Backend: Node.js with built-in
cryptomodule andcrystals-kyber-js - Quantum Encryption: ML-KEM-768 (Crystals-Kyber) via
crystals-kyber-jslibrary - Frontend: Vanilla HTML5, CSS3, and JavaScript
- UI Design: Modern gradient design with responsive layout
- Security: Uses Node.js crypto best practices
- Error Handling: Comprehensive error handling for all operations

