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
- Introduction to the C99 Programming Language : Part I
- Jagged Array or Array of Arrays in C with Examples
- Introduction to the C99 Programming Language : Part III
- Introduction to the C99 Programming Language : Part II
- Features of C Programming Language
- Difference between Increment and Decrement Operators
- Problem in comparing Floating point numbers and how to compare them correctly?
- exit(0) vs exit(1) in C/C++ with Examples
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.