KeyJolt is a secure web application for generating PGP and SSH key pairs instantly. Built with Spring Boot and Java 17, it provides a simple, modern interface for creating cryptographically secure keys with configurable parameters. The application emphasizes security through automatic key cleanup, rate limiting, and stateless operation.
- Template Engine: Thymeleaf for server-side rendering
- Styling: Custom CSS with Twitter Blue (#1DA1F2) color scheme
- JavaScript: Vanilla JS for form validation and user interactions
- Responsive Design: Mobile-first approach with clean, minimal UI
- Icons: Feather Icons for consistent iconography
- Framework: Spring Boot 3.2.0 with Java 17
- Security: Spring Security with custom configuration
- Validation: Jakarta Bean Validation for input sanitization
- Async Processing: Spring's @EnableAsync for background tasks
- Scheduling: @EnableScheduling for automatic cleanup
- PGP Keys: Bouncy Castle (bcpg-jdk15on) for RSA key generation
- SSH Keys: JSch library for SSH key pair creation
- Encryption: RSA with configurable strength (2048-4096 bits)
- KeyController: Main REST endpoint handler
- Manages form submissions and key generation requests
- Implements rate limiting using Bucket4j
- Handles file downloads with secure headers
- Validates user inputs and provides error handling
-
PgpKeyService: Handles PGP key pair generation
- Uses Bouncy Castle for RSA key creation
- Supports configurable key expiry and encryption strength
- Generates armored ASCII output format
-
SshKeyService: Manages SSH key pair creation
- Leverages JSch for RSA SSH key generation
- Creates OpenSSH format private keys
- Adds user comments to public keys
-
KeyRequest: Data transfer object for key generation parameters
- Validates name (alphanumeric, max 50 chars)
- Validates email format
- Ensures encryption strength within 2048-4096 bit range
- Limits key expiry to maximum 10 years
-
KeyResponse: Response wrapper for generated keys
- Contains success/failure status
- Includes file information and download links
- Provides error messages for failed generations
- FileUtils: Secure file handling and cleanup
- Creates temporary files in designated directory
- Implements automatic file deletion after configurable delay
- Schedules cleanup tasks to prevent disk space issues
- User Input: Form submission with name, email, encryption parameters
- Validation: Server-side validation using Jakarta Bean Validation
- Rate Limiting: IP-based request throttling using token bucket algorithm
- Key Generation:
- PGP keys generated using Bouncy Castle
- Optional SSH keys created with JSch
- Files written to temporary directory
- Response: Download links provided to user
- Cleanup: Scheduled deletion of temporary files after 5-minute delay
- Spring Boot Starter Web: REST API and embedded Tomcat
- Spring Boot Starter Thymeleaf: Template engine for UI
- Spring Boot Starter Security: Security framework and headers
- Spring Boot Starter Validation: Input validation framework
- Bouncy Castle (bcpg-jdk15on): PGP key generation and manipulation
- JSch: SSH key pair generation (implied from service structure)
- Feather Icons: SVG icon library via CDN
- Custom CSS: Twitter Blue themed styling
- Runtime: Java module with Maven build system
- Port: Application runs on port 5000
- Build Process:
mvn clean install && mvn spring-boot:run - Environment: Nix channel stable-24_05
- Server: Binds to 0.0.0.0:5000 for external access
- File Handling: 10MB max file size limit
- Rate Limiting: 10 requests per hour with burst capacity of 5
- Cleanup: 5-minute delay before file deletion
- Security: Stateless sessions, disabled CSRF for API endpoints
- HSTS: 1-year max age with subdomain inclusion
- CSP: Restrictive content security policy
- Frame Options: Deny to prevent clickjacking
- XSS Protection: Browser-level XSS filtering enabled
Preferred communication style: Simple, everyday language.
- June 18, 2025: Complete KeyJolt application deployed successfully
- Spring Boot backend with PGP/SSH key generation
- Twitter-blue themed responsive UI
- Real-time form validation and security features
- Rate limiting and automatic file cleanup
- GitHub repository created at https://github.com/hexawulf/KeyJolt
Repository URL: https://github.com/hexawulf/KeyJolt Author: 0xWulf (dev@0xwulf.dev, @hexawulf)
- README.md: Comprehensive documentation with tech stack and features
- LICENSE: MIT license
- .gitignore: Java/Maven/Spring Boot gitignore
- CONTRIBUTING.md: Development and contribution guidelines
- SECURITY.md: Security policy and vulnerability reporting
- DEPLOYMENT.md: Production deployment guide