Computer Network - Unit 5
Computer Network - Unit 5
Name-to-Address Resolution
The host requests the DNS name server to resolve the domain name. And the
name server returns the IP address corresponding to that domain name to the
host so that the host can future connect to that IP address.
But, when you have opened a website like google.com for information, you are
using the World Wide Web; a network of servers over the internet. You request a
webpage from your computer using a browser, and the server renders that page
to your browser. Your computer is called a client who runs a program (web
browser), and asks the other computer (server) for the information it needs.
All the websites are stored in web servers. Just as someone lives on rent in a
house, a website occupies a space in a server and remains stored in it. The server
hosts the website whenever a user requests its WebPages, and the website owner
has to pay the hosting price for the same.
The moment you open the browser and type a URL in the address bar or search
something on Google, the WWW starts working. There are three main
technologies involved in transferring information (web pages) from servers to
clients (computers of users). These technologies include Hypertext Markup
Language (HTML), Hypertext Transfer Protocol (HTTP) and Web browsers.
Messages
HTTP messages are of two types: request and response. Both the message types
follow the same message format.
Request Message: The request message is sent by the client that consists of a
request line, headers, and sometimes a body.
Response Message: The response message is sent by the server to the client
that consists of a status line, headers, and sometimes a body.
Uses of email
Fast communication in personal, professional, and educational settings.
Enables file sharing and collaboration.
Used for marketing, customer support, and notifications.
Key tool for job applications and business transactions.
Quick, cost-effective, and global communication tool.
History of E-mail
Email began in 1972 when Ray Tomlinson sent the first message over ARPANET,
introducing the "@" symbol. It quickly became popular within ARPANET, evolving
with the introduction of the SMTP protocol in 1982, which standardized email
transmission. In the 1990s, email gained mass popularity with web-based services
like Hotmail and Yahoo Mail. Gmail’s launch in 2004 revolutionized email by
offering large storage and powerful search features. With the rise of smartphones,
email became more accessible on mobile devices. Today, it remains a vital
communication tool for personal, professional, and business purposes, integrated
with cloud and productivity apps.
Advantages of Email
There are many advantages of email, which are as follows:
Cost-effective: Email is a very cost-effective service to communicate with others as
there are several email services available to individuals and organizations for free
of cost. Once a user is online, it does not include any additional charge for the
services.
Email offers users the benefit of accessing email from anywhere at any time if they
have an Internet connection.
Disadvantages of Email
Impersonal: As compared to other forms of communication, emails are less
personal. For example, when you talk to anyone over the phone or meeting face
to face is more appropriate for communicating than email.
Misunderstandings: As email includes only text, and there is no tone of voice or
body language to provide context. Therefore, misunderstandings can occur easily
with email.
Malicious Use: As email can be sent by anyone if they have an only email address.
Sometimes, an unauthorized person can send you mail, which can be harmful in
terms of stealing your personal information. Thus, they can also use email to
spread gossip or false information.
Accidents Will Happen: With email, you can make fatal mistakes by clicking the
wrong button in a hurry. For instance, instead of sending it to a single person, you
can accidentally send sensitive information to a large group of people. Thus, the
information can be disclosed, when you have clicked the wrong name in an
address list. Therefore, it can be harmful and generate big trouble in the
workplace.
Spam: Although in recent days, the features of email have been improved, there
are still big issues with unsolicited advertising arriving and spam through email. It
can easily become overwhelming and takes time and energy to control.
Email offers you an incurable communication process, which enables you to send
a response at a convenient time. Also, it offers users a better option to
communicate easily regardless of different schedules users.
Speed and simplicity: Email can be composed very easily with the correct
information and contacts. Also, minimum lag time, it can be exchanged quickly.
Mass sending: You can send a message easily to large numbers of people through
email.
Email exchanges can be saved for future retrieval, which allows users to keep
important conversations or confirmations in their records and can be searched
and retrieved when they needed quickly.
Types of FTP
There are different ways through which a server and a client do a file
transfer using FTP. Some of them are mentioned below:
Anonymous FTP: Anonymous FTP is enabled on some sites whose files are
available for public access.
Password Protected FTP: This type of FTP is similar to the previous one, but the
change in it is the use of username and password.
FTP Secure (FTPS): It is also called as FTP Secure Sockets Layer (FTP SSL). It is a
more secure version of FTP data transfer. Whenever FTP connection is established,
Transport Layer Security (TLS) is enabled.
FTP over Explicit SSL/TLS (FTPES): FTPES helps by upgrading FTP Connection from
port 21 to an encrypted connection.
Secure FTP (SFTP): SFTP is not a FTP Protocol, but it is a subset of Secure Shell
Protocol, as it works on port 22.
How Does FTP Work?
FTP is a client server protocol that has two communication channel,
command channel for conversation control and data channel for file
content.
Here are steps mentioned in which FTP works:
A user has to log in to FTP Server first, there may be some servers where
you can access to content without login, known as anonymous FTP.
Client can start a conversation with server, upon requesting to download a
file.
The user can start different functions like upload, delete, rename, copy files,
etc. on server.
FTP can work on different modes like Active and Passive modes
Types of Connection in FTP
Control Connection
Data Connection
Control Connection
For sending control information like user identification, password, commands to
change the remote directory, commands to retrieve and store files, etc., FTP
makes use of a control connection. The control connection is initiated on port
number 21.
Data connection
For sending the actual file, FTP makes use of a data connection. A data connection
is initiated on port number 20.
FTP Session
When an FTP session is started between a client and a server, the client initiates a
control TCP connection with the server side. The client sends control information
over this. When the server receives this, it initiates a data connection to the client
side. But the control connection remains active throughout the user session. As
we know HTTP is stateless . But FTP needs to maintain a state about its user
throughout the session.
FTP Clients
Some of the commands are:
get the filename(retrieve the file from the server)
get the filename(retrieve multiple files from the server )
ls(list files available in the current directory of the server)
Characteristics of FTP
FTP uses TCP as a transport layer protocol.
It is good for simple file transfers, such as during boot time.
Errors in the transmission (lost packets, checksum errors) must be handled by the
TFTP server.
It uses only one connection through well-known port 69.
TFTP uses a simple lock-step protocol (each data packet needs to be
acknowledged). Thus, the throughput is limited.
What is an FTP Port?
FTP operates using two ports:
Port 21: As mentioned earlier this is where the commands are issued.
Port 20: This is the special port required for data connection where the real
transfer of file is made.
Advantages of FTP
File sharing also comes in the category of advantages of FTP in this between two
machines files can be shared on the network.
Speed is one of the main benefits of FTP.
Since we don’t have to finish every operation to obtain the entire file, it is more
efficient.
Using the username and password, we must log in to the FTP server. As a result,
FTP might be considered more secure.
Disadvantages of FTP
File size limit is the drawback of FTP only 2 GB size files can be transferred.
More than one receiver is not supported by FTP.
FTP does not encrypt the data this is one of the biggest drawbacks of FTP.
FTP is unsecured we use login IDs and passwords making it secure but they can be
attacked by hackers.
Cryptography Introduction
Cryptography is the science of securing communication by transforming data into
an unreadable format to prevent unauthorized access. It ensures that information
remains confidential and can only be accessed by those for whom it is intended.
Definition of Cryptography
Cryptography is the method of protecting information by transforming it into an
unreadable format (ciphertext) through encryption. Only those with the correct
key can decrypt and access the original message (plaintext).
In Cryptography, an Adversary is a malicious entity, which aims to retrieve
precious information or data thereby undermining the principles of information
security. Data Confidentiality, Data Integrity, Authentication and Non-repudiation
are core principles of modern-day cryptography.
Features Of Cryptography
Confidentiality refers to certain rules and guidelines usually executed under
confidentiality agreements which ensure that the information is restricted to
certain people or places.
Data integrity refers to maintaining and making sure that the data stays accurate
and consistent over its entire life cycle.
Authentication is the process of making sure that the piece of data being claimed
by the user belongs to it.
Non-repudiation refers to the ability to make sure that a person or a party
associated with a contract or a communication cannot deny the authenticity of
their signature over their document or the sending of a message.
Types Of Cryptography
1. Symmetric Key Cryptography
It is an encryption system where the sender and receiver of a message use a
single common key to encrypt and decrypt messages. Symmetric Key
cryptography is faster and simpler but the problem is that the sender and
receiver have to somehow exchange keys securely. The most popular
symmetric key cryptography systems are Data Encryption Systems (DES) and
Advanced Encryption Systems (AES) .
2. Hash Functions
There is no usage of any key in this algorithm. A hash value with a fixed length
is calculated as per the plain text which makes it impossible for the contents of
plain text to be recovered. Many operating systems use hash functions to
encrypt passwords.
3. Asymmetric Key Cryptography
In Asymmetric Key Cryptography, a pair of keys is used to encrypt and decrypt
information. A receiver’s public key is used for encryption and a receiver’s
private key is used for decryption. Public keys and Private keys are different.
Even if the public key is known by everyone the intended receiver can only
decode it because he alone knows his private key. The most popular
asymmetric key cryptography algorithm is the RSA algorithm.
Applications of Cryptography
Computer passwords: Cryptography is widely utilized in computer security,
particularly when creating and maintaining passwords. When a user logs in,
their password is hashed and compared to the hash that was previously stored.
Passwords are hashed and encrypted before being stored. In this technique,
the passwords are encrypted so that even if a hacker gains access to the
password database, they cannot read the passwords.
Digital Currencies: To protect transactions and prevent fraud, digital currencies
like Bitcoin also use cryptography. Complex algorithms and cryptographic keys
are used to safeguard transactions, making it nearly hard to tamper with or
forge the transactions.
Secure web browsing: Online browsing security is provided by the use of
cryptography, which shields users from eavesdropping and man-in-the-middle
assaults. Public key cryptography is used by the Secure Sockets Layer (SSL) and
Transport Layer Security (TLS) protocols to encrypt data sent between the web
server and the client, establishing a secure channel for communication.
Electronic signatures: Electronic signatures serve as the digital equivalent of a
handwritten signature and are used to sign documents. Digital signatures are
created using cryptography and can be validated using public key cryptography.
In many nations, electronic signatures are enforceable by law, and their use is
expanding quickly.
Authentication: Cryptography is used for authentication in many different
situations, such as when accessing a bank account, logging into a computer, or
using a secure network. Cryptographic methods are employed by
authentication protocols to confirm the user’s identity and confirm that they
have the required access rights to the resource.
Cryptocurrencies: Cryptography is heavily used by cryptocurrencies like Bitcoin
and Ethereum to protect transactions, thwart fraud, and maintain the
network’s integrity. Complex algorithms and cryptographic keys are used to
safeguard transactions, making it nearly hard to tamper with or forge the
transactions.
End-to-end Internet Encryption: End-to-end encryption is used to protect two-
way communications like video conversations, instant messages, and email.
Even if the message is encrypted, it assures that only the intended receivers
can read the message. End-to-end encryption is widely used in
communication apps like WhatsApp and Signal, and it provides a high level of
security and privacy for users.
Goals of Cryptography
The goals of cryptography are to ensure confidentiality, data integrity, and
authenticity, even when there is an attack. Here are some examples of how
cryptography achieves these goals:
Confidentiality
Cryptography uses encryption to keep messages secret. For example, WhatsApp
encrypts conversations between users to prevent hacking or interception.
Data integrity
Cryptography ensures that data is consistent and accurate from the sender to the
receiver. Cryptographic hashing techniques can prevent data from being
manipulated.
Authenticity
Cryptography can help establish the authenticity of data. For example, digital
signatures can prove who created the signature and that the received content
matches the original.
Entity authentication
Cryptography can verify the identity of a sender by checking their knowledge of a
secret. This can be done using digital signatures, checksums, zero-knowledge
techniques, and symmetric systems.
Applications of Cryptography
Secure Communication: Used in emails, messaging apps, and VPNs.
Online Transactions: Protects financial data during transactions.
Digital Signatures: Used to verify the authenticity of documents.
Secure Web Browsing: Encryption protocols like SSL/TLS ensure secure data
exchange between users and websites.
Types of Attack in Cryptography
Cryptography attacks are malicious attempts to compromise the security of
cryptographic systems, aiming to exploit vulnerabilities and gain unauthorized
access to sensitive information.
Brute Force
What is Encryption?
Data can be secured with encryption by being changed into an unintelligible
format that can only be interpreted by a person with the proper decryption key.
Sensitive data, including financial and personal information as well as
communications over the internet, is frequently protected with it.
Application of Encryption
Many different fields employ encryption, including:
Online Banking: To secure transactions, use online banking.
Email security: To safeguard the contents of emails.
Secure Messaging: To protect the privacy of discussions.
Data Storage: To prevent unwanted access to data that has been stored.
What is Decryption?
To make encrypted data comprehensible again, it must first be decrypted and
then put back into its original format. To access and utilize the protected
information, authorized parties must follow this procedure.
Real-Life Examples of Encryption and Decryption
WhatsApp Messaging: It encrypts It encrypts communications from beginning to
end so that only the sender and recipient can read them.
HTTPS websites: Encrypt user data to prevent third parties from intercepting it.
Encrypted Email Services: Email services that use encryption, like Proton Mail,
protect email contents.