https://github.com/samuelsih/chat-encrypt
Simple TCP chat with DES encryption
https://github.com/samuelsih/chat-encrypt
Last synced: 2 months ago
JSON representation
Simple TCP chat with DES encryption
- Host: GitHub
- URL: https://github.com/samuelsih/chat-encrypt
- Owner: samuelsih
- License: mit
- Created: 2023-11-15T13:32:27.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-22T02:32:30.000Z (over 1 year ago)
- Last Synced: 2025-01-20T05:55:14.499Z (4 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chat-encrypt
### How To Run (With Makefile)
1. Make sure you have Makefile
2. For server, run `make serverx`
3. For client, run `make clientx`### How to Run (Without Makefile)
Note: **Replace 12345678 with your 64bit key**
1. For server, run `DES_KEY=12345678 go run server/main.go server/exec.go server/tools.go`
2. For client, run `DES_KEY=12345678 go run client/main.go`### Directional Protocol
#### This protocol is sent by the server without user request
Note:
1. (output) = message from server
| **Type** | **Response** |
| :-----------------------: | ---------------- |
| Other User Leave the Chat | LEAVE (output)\n |
### Bidirectional Protocol
#### User request to server and get the response back
Note:
1. (input) = input that you typed
2. (output) = message from server| **Protocol** | **Request** | **Success Response** | **Error Response** |
| ------------ | ------------------ | -------------------- | ------------------ |
| Registration | USERNAME (input)\n | RESPUSR (output)\n | Error (output)\n |
| Send Message | MESSAGE (input)\n | RESPMSG (output)\n | Error (output)\n |
| Exit | EXIT\n | EXIT\n | Error (output)\n |
### Unknown Protocol
#### Response to unknown protocol
Note:
1. (output) = message from server
| **Type** | **Response** |
| :--------------: | ----------------------------------------------- |
| Unknown Protocol | Unknown command. Please write correct command\n |