https://github.com/dynstat/websockets-in-c
https://github.com/dynstat/websockets-in-c
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dynstat/websockets-in-c
- Owner: dynstat
- Created: 2024-10-16T20:37:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-20T22:14:30.000Z (over 1 year ago)
- Last Synced: 2025-03-27T02:46:04.119Z (about 1 year ago)
- Language: C
- Size: 302 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebSocket Communication with Encryption
This project demonstrates a WebSocket-based communication system with encryption, featuring a C client and a Python server.
## Features
- Secure WebSocket communication
- AES-256 encryption for message exchange
- Client authentication and verification
- Heartbeat mechanism for connection monitoring
## Components
### Python Server (server.py)
- Implements the WebSocket server using `asyncio` and `websockets`
- Handles client authentication and name verification
- Processes encrypted messages and APDU commands
- Supports only localhost connections
### C Client (client.c)
- Uses `libwebsockets` for WebSocket communication
- Implements AES-256 encryption/decryption using OpenSSL
- Handles connection establishment and message exchange
## Setup
1. Install required libraries for both client and server
2. Compile the C client
3. Run the Python server
4. Connect using the C client
## Security Notes
- Uses a hardcoded encryption key (should be replaced with secure key management in production)
- Limited to localhost connections for added security
## Usage
Detailed usage instructions to be added.