You are on page 1of 23

Secure Local File Transfer Application

Group-02
CSN-503

Submitted By Supervised By
Abhishek Kumar - 23535001
Harsh Gour - 23535006 Prof. Durga Toshniwal
Dept of Computer Science
Manan Shah - 23535010
Swaroop Rajpurohit – 23535023
Jimmy Aghera - 23535031

1
Scope

● Introduction
● Socket Programming
● Encryption algorithm
● Modules and Functionalities
● Working of the model
● Output without encryption and with encryption
● Conclusion
Introduction
"Secure Local File Transfer Application" responds to the pressing need for a
dedicated software solution tailored to the unique file transfer requirements of
organizations. This endeavor aims to harness the power of socket programming to
create an application that seamlessly and securely facilitates file transfers among
employees within the same network.
The core objective of this project is to design and develop an application that not only
simplifies file sharing but also ensures the confidentiality and integrity of the data
being transferred. Leveraging robust encryption algorithms, the application will shield
sensitive information from potential threats and unauthorized access. This focus on
data security aligns with the imperative need for organizations to safeguard their
proprietary information, intellectual property, and other sensitive data assets
Socket Programming

The application uses the concept of socket programming, which facilitates the
connection between two network nodes for communication using a concept called
socket, as endpoints. One socket (node) listens on a specific IP address and port,
while the other socket initiates a connection to establish communication.
Socket Programming
Socket programming typically involves two types of applications: server and
client. The server application listens for incoming connections, accepts them, and
processes requests, while the client application initiates connections to the server
and sends requests.
In the application, we set a socket at both the server and the clients, after which a
client can connect to other client(s) through the IP address of the server and the
port number.
Socket Programming
Encryption
Security of the data during transmission in local area network is crucial part, as in
an organization there are many chances of attack like Eavesdropping (Packet
sniffing), Man In the Middle attack.
To avoid this kind of thing the best algorithm according to the modern world
requirements is Advance Encryption Standard (AES). This algorithm within the
Secure Local File Transfer Application project is a pivotal security measure that
ensures the confidentiality and integrity of transferred data. AES is a symmetric key
encryption algorithm renowned for its robustness and efficiency, making it a natural
choice for protecting sensitive files during transmission within a local network.
Encryption continued …

AES is employed to encrypt the data before it is transmitted over the network. This
process involves the use of a shared secret key, ensuring that only authorized
recipients possessing the correct key can decipher and access the data. This
encryption safeguards the content of the files from eavesdropping and
unauthorized access, even if intercepted during transmission. AES not only
encrypts the data but also ensures its integrity. Any tampering or unauthorized
modification of the encrypted data would render it unreadable.
Encryption continued …
Points about AES:
• AES is block cipher
• The key size can be 128/192/256 bits.
• Encrypts data in blocks of 128 bits each.

Working of cipher:
AES performs operations on bytes of data rather than in bits. Since the block size is
128 bits, the cipher processes 128 bits (or 16 bytes) of the input data at a time.
• 128 bit key - 10 rounds
• 192 bit key - 12 rounds
• 256 bit key - 14 rounds
Encryption continued …
• SubByte: all the bytes will be substituted
with some other using S-box.
• ShiftRows: In this step some row are
shifted accordingly to some predefined
rule.
• MixColumns: During this step each
column is multiplied with some specific
matrix.
• AddRoundKey: Now the
resultant/plaintext of previous round is
XOR-ed with the corresponding round
key.
Modules and Functionalities
Receiver.py

• Imports :- Importing necessary modules.


• Key and Nonce :- Defines Encryption of key and nonce.
• Socket Initialization:- Creation of Socket.
• Connection Establishment:- Established a connection between server and client.
• File Information:- Server receiving file information from client.
• File Reception Loop:-Script enters a loop to receive the file data.
• Progress Tracking:- To keep track of file transfer.
• Decryption and Writing:-Decryption of data and writing into a new file.
• Clean Up:-Closing of file , client socket and server socket.
Modules and Functionalities continued…

Sender.py

• Imports:- Importing necessary modules.


• Key and nonce :-Encryption of key and Nonce.
• Socket Initialization:-Creation of the socket.
• File Information:- Determines size of the packet and reads the file contents.
• Encryption:- Encryption of file content and its data.
• File Transfer:-Transferring of the file with encrypted data.
• Clean Up:-Closing of socket.
Working of the Model
• In order to run the model , we have to first run the receiver.
• To achieve this , we have to run the receiver.py file using the command ‘python receiver.py’.
• Once the receiver is running , we can connect sender to it.
• Now we have to run sender.py file using the command ‘python sender.py’.
• As soon as we run the sender.py the file will get started transferring to receiver.py.
• Now it will be seen in the terminal of receiver.py as shown in below diagram-
Snaps of different file sizes
Snaps of different files types
Analysis
Wireshark output without encryption
Wireshark output without encryption continued…
Wireshark output without Encryption continued…
The data packet which is being transferred is shown above, we can see the
highlighted part in this packet which is not encrypted and hence anyone can see the
data and there are chance of eavesdropping, so the data must be encrypted and must
be securely shared, for the same next point show the demo of the encrypted text send
though the socket programming.

The above demonstration shows how the non-encrypted data sent through the socket
programming can cause issue and lead to many issues, so here’s the below image
which shows the packet tracing and of the encrypted data.
Wireshark output with encryption
Wireshark output with encryption continued…
Conclusion

• The Secure Local File Transfer Application project has successfully addressed the
imperative need for secure and efficient file transfers within an organization's
local network. By combining socket programming and the Advanced Encryption
Standard (AES) algorithm, this project ensures data confidentiality and integrity
during transmission.
• In this project we successfully learn and implemented a dedicated software how to
efficiently transfer files among employees within internal network and the
software also validate the security of data transfer with the help of packet capture
tool like Wireshark.
THANK YOU

You might also like