The process of message encryption and decryption during client-server communication using UDP server is as follows:
- The client requests the server with a file name.
- The corresponding file is opened by the server and sends the file using datagram socket.
- The sender sends the encrypted text (Xoring) with a fixed length key.
- The receiver receives the encrypted text (cipher text).
- The receiver decrypts the file using the same key (private key).
Prerequisite : Socket Programming
Input : file.txt Output : ClientSide : Received from server: 00 2C 28 28 2A 6E 3B 24 37 64 65 79 0A 00 00 Decrypted message: Hello People ServerSide : Encrypted message stored in file: 00 2C 28 28 2A 6E 3B 24 37 64 65 79 0A 00
Client Side Program:
Server Side Program:
- IPC using Message Queues
- Print colored message with different fonts and sizes in C
- TCP Server-Client implementation in C
- UDP Server-Client implementation in C
- Reverse a string in C/C++ using Client Server model
- Socket Programming in C/C++: Handling multiple clients on server without multi threading
- time.h header file in C with Examples
- __builtin_inf() functions of GCC compiler
- Count substrings that contain all vowels | SET 2
- How can we use Comma operator in place of curly braces?
- Basic Code Optimizations in C
- Constants vs Variables in C language
- Sum of an array using MPI
- Difference between pointer to an array and array of pointers
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.