- Introduction
- Current Features
- Technologies Used
- Security Measures
- Installation
- API Documentation
- Future Enhancements
A web application that provides text encryption and decryption capabilities using AES and RSA algorithms. The app features a simple user interface for text encryption and decryption operations.
- Text encryption and decryption using AES-256-CBC
- Includes salt and IV generation
- Uses PBKDF2 for key derivation
- Text encryption and decryption using RSA (2048-bit)
- Simple web interface with:
- Separate encryption and decryption forms
- Method selection (AES/RSA)
- Real-time error display
- Responsive design
- Error handling and validation
Frontend:
- HTML5
- CSS3 with custom properties
- JavaScript
Backend:
- Node.js
- Express.js
- crypto (Node.js built-in module)
- node-rsa package
Security:
- helmet (HTTP headers)
- body-parser (Request parsing)
Currently implemented:
- HTTP security headers via Helmet
- Request body validation
- Environment variable for encryption key
- Secure random IV and salt generation for AES
- Error messages that don't expose system details
- Install dependencies:
npm install
- Create a .env file with required environment variables:
ENCRYPTION_KEY=your_32_byte_encryption_key
PORT=3000
- Start the server:
node app.js
The application will be available at http://localhost:3000
POST /encrypt
Content-Type: application/json
{
"text": "Text to encrypt",
"method": "AES" | "RSA"
}
Response:
{
"encrypted": "encrypted_text"
}
POST /decrypt
Content-Type: application/json
{
"text": "encrypted_text",
"method": "AES" | "RSA"
}
Response:
{
"decrypted": "original_text"
}
{
"error": "Error message"
}
Currently handled errors:
- Missing text input ("Text is required.")
- Invalid encryption/decryption method
- Invalid encryption key configuration
- Invalid encrypted text format
- RSA encryption/decryption errors
-
Security Features:
- Rate limiting
- CORS protection
- Key rotation
- Digital signatures
- Advanced key management
-
Additional Functionality:
- File encryption
- Batch processing
- Operation history
- Additional encryption algorithms
-
Infrastructure:
- Automated testing
- CI/CD pipeline
- Monitoring system
- Docker containerization