An educational prototype demonstrating core TCP features using UDP sockets in Python. The goal was to understand the principles of the TCP protocol, including reliable data transfer, connection management, handling out-of-order data, ACK management, and termination management.
-
TCP 3-Way Handshake Implementation Simulates the standard SYN, SYN-ACK, and ACK sequence for connection establishment.
-
Reliable Data Transfer Ensures in-order delivery using acknowledgments and retransmission; handles out-of-order packets.
-
Graceful and Abrupt Connection Termination Supports connection teardown using FIN and RST flags.
-
Concurrent Client Handling The server can manage multiple client connections simultaneously.
-
End-to-End Encryption with RSA Secures data transmission using RSA-based asymmetric encryption.
-
Flow Control Regulates data flow between sender and receiver to prevent buffer overflow.
-
Congestion Control Adjusts sending rate based on network conditions to minimize packet loss and congestion.
-
Dynamic Timeout Calculation Calculates retransmission timeouts based on estimated round-trip time (RTT).
-
Sequence Number Wrapping Correctly handles sequence number overflow using modulo arithmetic.
- Download or clone the repository.
- Install or upgrade to Python 3.
- Install the required cryptographic library.
pip3 install pycryptodome
- Run the server or client.