A modern, full-stack web application featuring a completely custom encryption algorithm called "QuantumShift Cipher". Built with Next.js, this application provides secure text encryption and decryption with a beautiful, responsive user interface.
Made with ❤️ by RBaskey
| Scenario | Can Decode? | Difficulty |
|---|---|---|
| Knows only output | ❌ No | Impossible |
| Knows output + key | ❌ No | Extremely hard |
| Knows output + key + algorithm | ✅ Yes | Fully possible |
| Knows key but wrong algorithm | ❌ No | No way to decrypt |
- Multi-layer encryption with 6 distinct transformation steps
- Key-based personalization using custom salt integration
- Position-dependent encoding for enhanced security
- Bit manipulation and mathematical transformations
- Reversible operations with integrity verification
- No reliance on standard ciphers (AES, Caesar, Base64, etc.)
- Glassmorphism design with gradient backgrounds
- Smooth animations and transitions
- Responsive layout for all device sizes
- Real-time feedback with toast notifications
- Interactive controls with tabbed interface
- Copy-to-clipboard functionality
- Input/output text swapping for convenience
- RESTful API with dedicated encrypt/decrypt endpoints
- Comprehensive error handling and validation
- Security verification with key signatures
- Detailed logging for debugging and monitoring
- CORS enabled for cross-origin requests
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icons
- Next.js API Routes - Serverless functions
- Node.js - Runtime environment
- Custom encryption algorithm - No external crypto libraries
- Node.js 18+
- npm or yarn package manager
-
Clone the repository ```bash git clone https://github.com/yourusername/cryptovault.git cd cryptovault ```
-
Install dependencies ```bash npm install
yarn install ```
-
Run the development server ```bash npm run dev
yarn dev ```
-
Open your browser Navigate to http://localhost:3000
```bash npm run build npm start ```
- Enter your encryption key (salt) in the key field
- Input your text in the text area
- Select Encrypt or Decrypt mode using the tabs
- Click the action button to process your text
- Copy or swap the result as needed
``` Input Text: "Hello World!" Encryption Key: "mySecretKey" Encrypted Output: "A7L~B8M#C9N@D10O%E11P&F12Q*G13R+H14S=I15T!J16U?K17V|ABC1" Decrypted Output: "Hello World!" ```
The custom encryption algorithm applies six layers of transformation:
- Key Hash Generation - Creates consistent transformations from user key
- Position-Based Shifting - Each character shifted based on position and key
- XOR Operations - Key-dependent bitwise operations
- Bit Rotation - Position-based bit shifting for obfuscation
- Prime Multiplication - Mathematical transformation using prime numbers
- Custom Base Conversion - Base-36 encoding with position markers
- Key Signature Verification - Ensures data integrity
- Position Markers - Prevents reordering attacks
- Dynamic Separators - Obfuscates data structure
- Modular Arithmetic - Enables reversible operations
- Time Complexity: O(n) where n is text length
- Space Complexity: O(n) for output storage
- Key Dependency: Each character transformation depends on key and position
POST /api/encrypt
```json { "text": "Hello World!", "key": "mySecretKey" } ```
Response: ```json { "result": "A7L~B8M#C9N@D10O%E11P&F12Q*G13R+H14S=I15T!J16U?K17V|ABC1" } ```
POST /api/decrypt
```json { "cipherText": "A7L~B8M#C9N@D10O%E11P&F12Q*G13R+H14S=I15T!J16U?K17V|ABC1", "key": "mySecretKey" } ```
Response: ```json { "result": "Hello World!" } ```
```json { "error": "Text is required" } ```
```json { "error": "Invalid key or corrupted data" } ```
- Custom Implementation - Not based on known vulnerable ciphers
- Key-Dependent Operations - Different keys produce different outputs
- Integrity Verification - Key signatures prevent tampering
- Position Sensitivity - Character order affects encryption
- Input Validation - All inputs are validated and sanitized
- Error Handling - Secure error messages without information leakage
- No Key Storage - Keys are not stored on the server
- HTTPS Recommended - Use HTTPS in production for key transmission
- Educational Purpose - Not intended for production cryptographic needs
- Key Management - Users responsible for key security
- No Key Recovery - Lost keys cannot recover encrypted data
``` cryptovault/ ├── app/ │ ├── api/ │ │ ├── encrypt/ │ │ │ └── route.ts # Encryption API endpoint │ │ └── decrypt/ │ │ └── route.ts # Decryption API endpoint │ ├── globals.css # Global styles and animations │ ├── layout.tsx # Root layout component │ └── page.tsx # Main application page ├── components/ │ └── ui/ # Reusable UI components │ ├── button.tsx │ ├── card.tsx │ ├── input.tsx │ ├── label.tsx │ ├── tabs.tsx │ └── textarea.tsx ├── hooks/ │ └── use-toast.ts # Toast notification hook ├── lib/ │ └── utils.ts # Utility functions ├── public/ # Static assets ├── next.config.js # Next.js configuration ├── package.json # Dependencies and scripts ├── tailwind.config.js # Tailwind CSS configuration └── README.md # Project documentation ```
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch ```bash git checkout -b feature/amazing-feature ```
- Commit your changes ```bash git commit -m 'Add amazing feature' ```
- Push to the branch ```bash git push origin feature/amazing-feature ```
- Open a Pull Request
- Follow TypeScript best practices
- Maintain consistent code formatting
- Add comments for complex algorithm logic
- Test encryption/decryption thoroughly
- Update documentation for new features
- Large text inputs (>10MB) may cause performance issues
- Unicode characters with high code points may not encrypt properly
- Browser compatibility limited to modern browsers supporting ES6+
- File Encryption - Support for encrypting files
- Batch Processing - Encrypt multiple texts simultaneously
- Key Strength Meter - Visual feedback for key security
- Encryption History - Save and manage encrypted texts
- Export/Import - Save encrypted data to files
- Mobile App - React Native implementation
- Advanced Algorithms - Additional custom cipher options
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team - For the amazing React framework
- Tailwind CSS - For the utility-first CSS framework
- Radix UI - For accessible component primitives
- Vercel - For seamless deployment platform