Chat securely, instantly. Real-time encrypted chat built with Spring Boot, React, and WebSockets using RSA + AES hybrid encryption.
Cryptify is a secure messaging platform that ensures end-to-end privacy through client-side encryption. Messages are encrypted before transmission, sent over WebSockets, and decrypted only by the intended recipient—the server never sees the plain text.
- End-to-End Encryption: Hybrid encryption combining RSA (key exchange) and AES (message encryption)
- Real-Time Messaging: Instant message delivery powered by WebSockets
- Secure Authentication: User authentication with Spring Security
- Private Conversations: One-on-one encrypted chats
- Transport Layer Security: TLS/SSL encryption for data in transit
Cryptify follows a client-server architecture with clear separation of concerns:
- Frontend: React-based SPA handling UI, client-side encryption, and WebSocket connections
- Backend: Spring Boot server managing authentication, message routing, and WebSocket endpoints
- Communication: Real-time bidirectional communication via WebSockets (STOMP protocol)
- Security: Multi-layered approach with hybrid encryption and TLS/SSL
-
Hybrid Encryption (RSA + AES):
- RSA-2048 for secure key exchange
- AES-256-GCM for efficient message encryption
- Each session generates unique encryption keys
-
Transport Layer Security:
- TLS/SSL for all client-server communication
- Protection against man-in-the-middle attacks
- Framework: React 18.x
- WebSocket Client: STOMP.js, SockJS
- Cryptography: Web Crypto API
- Testing: Jest, React Testing Library
- Build Tool: React Scripts
- Framework: Spring Boot 3.x
- Security: Spring Security
- WebSocket: Spring WebSocket with STOMP
- Language: Java
- Frontend: Vercel
- Backend: Render
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher) and npm
- Java Development Kit (JDK) (v17 or higher)
- Maven or Gradle (for backend build)
- A code editor (VS Code, IntelliJ IDEA, etc.)
git clone https://github.com/mohdhedayati/Encrypted-Chat-Application.git
cd Encrypted-Chat-Applicationcd chat-server
# Install dependencies and build
./mvnw clean install
# Run the Spring Boot application
./mvnw spring-boot:runThe backend server will start on http://localhost:8080 by default.
cd frontend
# Install dependencies
npm install
# Start the development server
npm startThe frontend will open in your browser at http://localhost:3000.
Edit chat-server/src/main/resources/application.properties:
server.port=8080
spring.websocket.allowed-origins=http://localhost:3000Update WebSocket connection settings in frontend/src/config.js (if applicable):
const SOCKET_URL = process.env.REACT_APP_SOCKET_URL || 'http://localhost:8080';- Register/Login: Create an account or log in with existing credentials
- Start Chatting: Select a contact to begin a private encrypted conversation
- Send Messages: Type your message and hit send—encryption happens automatically
- Secure Communication: All messages are encrypted end-to-end; only you and your recipient can read them
For comprehensive documentation including architecture details, API reference, and security implementation:
Documentation covers:
- Detailed architecture overview
- Component interaction diagrams
- API endpoints and usage
- Cryptography implementation details
- Deployment guides
