0% found this document useful (0 votes)
42 views85 pages

Unit-5 Transport and Application Layer

The transport layer is crucial for data transport between processes on different machines, offering both connection-oriented and connectionless services. It utilizes sockets for communication, establishes connections through a three-way handshake, and manages data transfer using protocols like TCP and UDP. Additionally, Real-Time Transport Protocol (RTP) and its control protocol (RTCP) facilitate real-time data delivery and monitoring for applications such as VoIP and video streaming.

Uploaded by

uwmabtw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views85 pages

Unit-5 Transport and Application Layer

The transport layer is crucial for data transport between processes on different machines, offering both connection-oriented and connectionless services. It utilizes sockets for communication, establishes connections through a three-way handshake, and manages data transfer using protocols like TCP and UDP. Additionally, Real-Time Transport Protocol (RTP) and its control protocol (RTCP) facilitate real-time data delivery and monitoring for applications such as VoIP and video streaming.

Uploaded by

uwmabtw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 85

UNIT-V

Transport Layer
Application layer
Transport Layer

• The transport layer is the heart of the protocol hierarchy.


• The transport layer builds on the network layer to provide data
transport from a process on a source machine to a process on a
destination machine.
Services provided by the transport layer
• The software and/or hardware within the transport layer that does
the work is called the transport entity.
• Just as there are two types of network service, connection-oriented
and connectionless, there are also two types of transport service.
• The connection-oriented transport service is similar to the
connection-oriented network service in many ways. In both cases,
connections have three phases: establishment, data transfer, and
release.
• Addressing and flow control are also similar in both layers.
• The transport code runs entirely on the users’
machines, but the network layer mostly runs on the
routers. What if router fails?
• The only possibility is to put on top of the network
layer another layer that improves the quality of the
service.
• If, in a connectionless network, packets are lost or
mangled, the transport entity can detect the problem
and compensate for it by using retransmissions.
• In Earlier days, The data unit in transport layer is
known as Transport Protocol Data Unit(TPDU), now it
is known as Segment.
Sockets:
 Sockets were first released as part of the Berkeley
UNIX 4.2BSD software distribution in 1983.
 A socket is one endpoint of a two-way
communication link between two programs running
on the network.
 A socket is bound to a port number so that
the TCP layer can identify the application that data is
destined to be sent to. An endpoint is a combination
of an IP address and a port number
Elements of Transport Protocols:

Addressing:
• When an application (e.g., a user) process wishes to set up a
connection to a remote application process, it must specify
which one to connect to.
• The method normally used is to define transport addresses to
which processes can listen for connection requests. In the
Internet, these endpoints are called ports.
• TSAP (Transport Service Access Point)- specific endpoint in
transport layer
• NSAPs(Network Service Access Points)- specific endpoint in
Network layer. IP addresses are examples of NSAPs.
A possible scenario for a transport connection is as follows:
• A mail server process attaches itself to TSAP 1522 on host 2
to wait for an incoming call. How a process attaches itself to a
TSAP is out- side the networking model and depends entirely
on the local operating system. A call such as our LISTEN might
be used, for example.
• An application process on host 1 wants to send an email
message, so it attaches itself to TSAP 1208 and issues a
CONNECT request. The request specifies TSAP 1208 on host 1
as the source and TSAP 1522 on host 2 as the destination.
This action ultimately results in a transport connection being
established between the application process and the server.
• The application process sends over the mail message.
• The mail server responds to say that it will deliver the
message.
• The transport connection is released.
Connection Establishment:
• Establishing a connection sounds easy, but it is actually
surprisingly tricky.
• At first glance, it would seem sufficient for one transport
entity to just send a CONNECTION REQUEST segment to the
destination and wait for a CONNECTION ACCEPTED reply.
• The problem occurs when the network can lose, delay,
corrupt, and duplicate packets.
• To solve this problem, Tomlinson (1975) introduced the
three-way handshake.
• The normal setup procedure when host 1 initiates is shown
in Fig. 6-11(a).
• Host 1 chooses a sequence number, x, and sends a
CONNECTION REQUEST segment containing it to host 2.
• Host 2 replies with an ACK segment acknowledging x and
announcing its own initial sequence number, y.
• Finally, host 1 acknowledges host 2’s choice of an initial
sequence number in the first data segment that it sends.
• In Fig. 6-11(b), the first segment is a delayed duplicate
• CONNECTION REQUEST from an old connection. This segment
arrives at host 2 without host 1’s knowledge.
• Host 2 reacts to this segment by sending host 1 an ACK
segment.
• When host 1 rejects host 2’s attempt to establish a connection,
host 2 realizes that it was tricked by a delayed duplicate and
abandons the connection. In this way, a delayed duplicate does
no damage.
• The worst case is when both a delayed CONNECTION REQUEST
and an ACK are floating around in the subnet(Fig.6-11(c))
Connection Release:
• Releasing a connection is easier than establishing one.
• Asymmetric release is the way the telephone system works: when
one party hangs up, the connection is broken.
• Symmetric release treats the connection as two separate
unidirectional connections and requires each one to be released
separately
• In Fig. 6-14(a), we see the normal case in which one
of the users sends a DR (DISCONNECTION REQUEST)
segment to initiate the connection release. When it
arrives, the recipient sends back a DR segment and
starts a timer, just in case its DR is lost.
• When this DR arrives, the original sender sends back
an ACK segment and releases the connection. Finally,
when the ACK segment arrives, the receiver also
releases the connection.
• Releasing a connection means that the transport
entity removes the information about the
connection from its table of currently open
connections
THE INTERNET TRANSPORT PROTOCOLS: UDP
and TCP
• The Internet has two main protocols in the transport
layer, a connectionless protocol and a connection-
oriented one.
• The protocols complement each other. The
connectionless protocol is User Datagram
Protocol(UDP).
• The connection-oriented protocol is Transmission
Control Protocol(TCP).
UDP(user datagram protocol)

 UDP is described in RFC 768.


 UDP transmits segments consisting of an 8-byte header
followed by the payload.
 The header is shown in Fig. The two ports serve to identify
the endpoints within the source and destination machines.
When a UDP packet arrives, its payload is handed to the
process attached to the destination port
 The source port is primarily needed when a reply must be
sent back to the source.
 By copying the Source port field from the incoming segment
into the Destination port field of the outgoing segment, the
process sending the reply can specify which process on the
sending machine is to get it.
• Source Port : Source Port is 2 Byte long field used to
identify port number of source.
• Destination Port : It is 2 Byte long field, used to identify
the port of destined packet.
• Length : Length is the length of UDP including header and
the data. It is 16-bits field.
• Checksum : Checksum is 2 Bytes long field.
Remote Procedure call:
• When a process on machine 1 calls a procedure on
machine 2, the calling process on 1 is suspended and
execution of the called procedure takes place on 2.
• Information can be transported from the caller to the
callee in the parameters and can come back in the
procedure result.
• No message passing is visible to the application
programmer. This technique is known as RPC
(Remote Procedure Call).
• To call a remote procedure, the client program must
be bound with a small library procedure, called the
client stub. Similarly the server is bound with a
procedure called the server stub.
The actual steps in making an RPC:
• The client calling the client stub.
• The client stub packing the parameters into a
message and making a system call to send the
message. Packing the parameters is called
marshaling.
• The operating system sending the message from the
client machine to the server machine.
• The operating system passing the incoming packet
to the server stub.
• The server stub calling the server procedure with the
unmarshaled parameters.
• The reply traces the same path in the other direction.
THE INTERNET TRANSPORT PROTOCOLS: TCP
• TCP (Transmission Control Protocol) was specifically
designed to provide a reliable end-to-end byte stream
over an unreliable internetwork.
• TCP was formally defined in RFC 793 in September 1981.
• A port is the TCP name for a TSAP
• All TCP connections are full duplex and point-
to-point.
• Full duplex means that traffic can go in both
directions at the same time. Point-to-point
means that each connection has exactly two
end points.
• TCP does not support multicasting or
broadcasting.
• TCP entity accepts user stream and divides it
into IP datagrams
TCP Header:
• Source Port (16-bits) - It identifies source port of
the application process on the sending device.
• Destination Port (16-bits) - It identifies destination
port of the application process on the receiving
device.
• Sequence Number (32-bits) - Sequence number of
data bytes of a segment in a session.
• Acknowledgement Number (32-bits) - When ACK
flag is set, this number contains the next sequence
number of the data byte expected and works as
acknowledgement of the previous data received.
• CWR - When a host receives packet with ECE bit set, it sets Congestion
Windows Reduced to acknowledge that ECE received.
• ECE -It has two meanings:
– If SYN bit is clear to 0, then ECE means that the IP packet has its CE
(congestion experience) bit set.
– If SYN bit is set to 1, ECE means that the device is ECT capable.
• URG - It indicates that Urgent Pointer field has significant data and should be
processed.
• ACK - It indicates that Acknowledgement field has significance. If ACK is cleared
to 0, it indicates that packet does not contain any acknowledgement.
• PSH - When set, it is a request to the receiving station to PUSH data (as soon as
it comes) to the receiving application without buffering it.
• RST - Reset flag has the following features:
– It is used to refuse an incoming connection.
– It is used to reject a segment.
– It is used to restart a connection.
• SYN - This flag is used to set up a connection between hosts.
• FIN - This flag is used to release a connection and no more data is exchanged
thereafter. Because packets with SYN and FIN flags have sequence numbers,
they are processed in correct order.
• Windows Size - This field is used for flow control
between two stations and indicates the amount of
buffer (in bytes) the receiver has allocated for a
segment, i.e. how much data is the receiver
expecting.
• Checksum - This field contains the checksum of
Header, Data and Pseudo Headers.
• Urgent Pointer - It points to the urgent data byte if
URG flag is set to 1.
• Options - It facilitates additional options which are
not covered by the regular header. Option field is
always described in 32-bit words. If this field
contains data less than 32-bit, padding is used to
cover the remaining bits to reach 32-bit boundary.
TCP Connection Establishment:
• Connections are established in TCP by means of the
three-way handshake
• Client initiates the connection and sends the segment
with a Sequence number.
• Server acknowledges it back with its own Sequence
number and ACK of client’s segment which is one
more than client’s Sequence number.
• Client after receiving ACK of its segment sends an
acknowledgement of Server’s response.
• In the second case, two hosts simultaneously attempt
to establish a connection between the same two
sockets
• The result of these events is that just one
connection is established, not two, because
connections are identified by their end points.
• If the first setup results in a connection
identified by (x, y) and the second one does
too, only one table entry is made, namely, for
(x, y).
TCP Connection Release:
• To release a connection, either party can send a TCP
segment with the FIN bit set, which means that it has no
more data to transmit.
• When the FIN is acknowledged, that direction is shut
down for new data. Data may continue to flow
indefinitely in the other direction, however.
• When both directions have been shut down, the
connection is released.
• Normally, four TCP segments are needed to release a
connection: one FIN and one ACK for each direction.
• However, it is possible for the first ACK and the second
FIN to be contained in the same segment, reducing the
total count to three.
THE INTERNET TRANSPORT PROTOCOLS-
RTTP/RTP
• Real-time Transport Protocol (RTP) is the protocol
designed to handle real-time traffic on the
Internet.
• RTP does not have a delivery mechanism
(multicasting, port numbers, and so on); it must be
used with UDP.
• RTP stands between UDP and the application
program. The main contributions of RTP
timestamping, sequencing, facilities. are and
mixing
 RTP is first time published in 1996 and known
as RFC 1889. And next it published in 2003
with name of RFC 3550. Applications of RTP :
 RTP mainly helps in media mixing, sequencing
and time-stamping.
 Voice over Internet Protocol (VoIP)
 Video Teleconferencing over Internet.
 Internet Audio and video streaming.
RTP Header Format :
The diagram of header format of RTP packet is shown below
 header format of RTP is very simple and it covers all real-time
applications. The explanation of each field of header format is given
below:
 Version : This 2-bit field defines version number. The current version is
2.
 P – The length of this field is 1-bit. If value is 1, then it denotes presence of
padding at end of packet and if value is 0, then there is no padding.
 X – The length of this field is also 1-bit. If value of this field is set to 1, then its
indicates an extra extension header between data and basic header and if
value is 0 then, there is no extra extension.
 Contributor count – This 4-bit field indicates number of contributors. Here
maximum possible number of contributor is 15 as a 4-bit field can allows
number from 0 to 15.
 M – The length of this field is 1-bit and it is used as end marker by application
to indicate end of its data.
 Payload types – This field is of length 7-bit to indicate type of payload. We list
applications of some common types of payload.
 Sequence Number – The length of this field is 16 bits. It is used to give serial
numbers to RTP packets. It helps in sequencing. The sequence number for
first packet is given a random number and then every next packet’s sequence
number is incremented by 1. This field mainly helps in checking lost packets
 Time Stamp – The length of this field is 32-bit. It is used to find
relationship between times of different RTP packets. The
timestamp for first packet is given randomly and then time
stamp for next packets given by sum of previous timestamp and
time taken to produce first byte of current packet. The value of
1 clock tick is varying from application to application.
 Synchronization Source Identifier – This is a 32-bit field used to
identify and define the source. The value for this source
identifier is a random number that is chosen by source itself.
This mainly helps in solving conflict arises when two sources
started with the same sequencing number.
 Contributor Identifier – This is also a 32-bit field used for source
identification where there is more than one source present in
session. The mixer source use Synchronization source identifier
and other remaining sources (maximum 15) use Contributor
identifier.
Real-Time Transport Control Protocol
(RTCP)
 Real-Time Transport Control Protocol (RTCP) is a
protocol that works with Real-Time Protocol (RTP) to
monitor data delivery on large multicast networks.
 The purpose of monitoring delivery is to determine
whether RTP is providing the necessary Quality of
Service (QoS) and to compensate for delays, if needed.
 RTCP is used in voice over IP (VoIP) and
 Internet Protocol Television (IPTV),
 streaming media and
 video conferencing.
 RTCP carries statistical and control data, while RTP
delivers the data.
 RTCP statistics typically include the number of bytes
sent, packets sent, lost packets and round trip delay
between endpoints.
 RTCP also carries the canomical name (CNAME), which
is a unique identifier for a participant during a session.
 RTCP can use five different packet types to carry
statistical and control data. The packets are
 RR (receiver report),
 SR (sender report),
 SDES (source description items),
 BYE (indicates end of participation) and
 APP (application specific functions).
 Sender Report : The sender report is sent after a fixed interval by the active
sender in a conference to report transmission as well as statistics of reception
for all RTP packets transmitted during the time period. The report sent by the
sender contains the detail of absolute time-stamp, that is the number of
seconds elapsed since midnight on January 1, 1970. After receiving the RTP
messages by the receiver, these details of absolute timestamps helps the
receiver for synchronization process. And this is very much important in audio
video transmission for finding the relative timestamp.
 Receiver Report : Passive participants are those participants that do not send
RTP packets, and for them the Receiver report is used. This report is used to
informs the sender and other receivers about the quality of service.
 Source Description Message : The source sends a source description message
within a fixed interval to give some extra information about itself. It contains the
details about the name of the source, its mail ID, contact number or source
controller.
 Bye Message : To shut down a stream, a source sends a type of message which
is known as Bye message. It is used by the source to announcing for leaving the
conference. This message is a direct announcement for other sources about the
absence of a source. It can be used for combining different media file.
 Application-Specific Message : If we want to make our application extensible
then RTCP allows application-specific RTCP packets which is introduced by RTC
3611. It can be used to extend the type of application.
Application layer

Domain Name System(DNS)


 Network understands only numerical addresses, some
mechanism is required to convert the names to network
addresses. In the following sections, we will study how
this mapping is accomplished in the Internet.
 It is primarily used for mapping host names to IP
addresses but can also be used for other purposes.
 The way DNS is used is as follows:
 To map a name onto an IP address, an application
program calls a library procedure called the resolver,
passing it the name as a parameter.
 The resolver sends a query containing the name to a
local DNS server, which looks up the name and
returns a response containing the IP address to the
resolver, which then returns it to the caller.
 The DNS Name Space:
 For the Internet, the top of the naming hierarchy is
managed by an organization called ICANN (Internet
Corporation for Assigned Names and Numbers).
 The Internet is divided into over 250 top-level
domains, where each domain covers many hosts.
There are various kinds of DOMAIN :
 Generic
domain : .com(commercial) .edu(educational) .mil(militar
y) .org(non profit organization) .net(similar to
commercial) all these are generic domain.
 Country domain .in (India) .us (uk)
 Name Servers:
 A single name server could contain the entire DNS
database and respond to all queries about it. In practice,
this server would be so overloaded as to be useless.
 To avoid the problems, the DNS name space is
divided into no overlapping zones
• Normally, a zone will have one primary name server,
which gets its information from a file on its disk, and
one or more secondary name servers, which get their
information from the primary name server
Hypertext Transfer Protocol (HTTP)
HTTP:
 Hypertext Transfer Protocol (HTTP) is an application-
level protocol.
 HTTP is a TCP/IP based communication protocol, that is
used to deliver data (HTML files, image files, query
results, etc.) on the World Wide Web.
 The default port is TCP 80, but other ports can be used
as well.
 The most current version of HTTP is 1.1.
 Features:
 HTTP is connectionless.
 HTTP is media independent.
 HTTP is stateless
HTTP Connections:
Non-persistent connection is known as HTTP 1.0 and Persistent
connection is known as HTTP 1.1.
• Non-Persistent Connection: It requires connection setup
again and again for each object to send.
The following lists the steps in this strategy:
1. The client opens a TCP connection and sends a request.
2. The server sends the response and closes the connection.
3. The client reads the data until it encounters an end-of-file
marker; it then closes the connection.
• Persistent connection: It does not require connection setup
again and again. Multiple objects can use connection. The
server leaves the connection open for more requests after
sending a response
HTTP Transaction:
The client initializes the transaction by sending a
request message. The server replies by
sending a response.
Messages:
• The formats of the request and response
messages are similar.
• A request message consists of a request line, a
header, and sometimes a body. A response
message consists of a status line, a header,
and sometimes a body.
• Request and Response Messages:

Request Line Status line

Headers Headers
A blank line A blank line

Body(present only in some Body(present only in some


messages) messages)

Status code: This field is used in the response message.


It consists of three digits.
Request type: This field is used in the request message.
In version 1.1 of HTTP, several request types are defined
• Request type Methods:
Simple Mail Transfer Protocol (SMTP)
 Email is emerging as one of the most valuable services on the
internet today. Most internet systems use SMTP as a method to
transfer mail from one user to another.
 SMTP is a push protocol and is used to send the mail whereas
POP (post office protocol) or IMAP (internet message access
protocol) are used to retrieve those emails at the receiver’s side.
• SMTP Fundamentals
SMTP is an application layer protocol. The client who wants to
send the mail opens a TCP connection to the SMTP server and
then sends the mail across the connection.
• The SMTP server is an always-on listening mode. As soon as it
listens for a TCP connection from any client, the SMTP process
initiates a connection through port 25.
• After successfully establishing a TCP connection the client
process sends the mail instantly.
 SMTP Protocol

 The SMTP model is of two types:

 End-to-end method
 Store-and- forward method

 The end-to-end model is used to communicate between different organizations


whereas the store and forward method is used within an organization.
 An SMTP client who wants to send the mail will contact the destination’s host
SMTP directly, in order to send the mail to the destination.
 The SMTP server will keep the mail to itself until it is successfully copied to the
receiver’s SMTP.
The client SMTP is the one that initiates the session so let us call it client- SMTP
and the server SMTP is the one that responds to the session request so let us
call it receiver-SMTP.
 The client- SMTP will start the session and the receiver-SMTP will respond to
the request.
 Model of SMTP system
 In the SMTP model user deals with the user agent (UA),
for example, Microsoft Outlook, Netscape, Mozilla, etc.
 In order to exchange the mail using TCP, MTA is used.
The user sending the mail doesn’t have to deal with
MTA as it is the responsibility of the system admin to
set up a local MTA.
 The MTA maintains a small queue of mails so that it
can schedule repeat delivery of mails in case the
receiver is not available.
 The MTA delivers the mail to the mailboxes and the
information can later be downloaded by the user
agents.
• Both the SMTP-client and SMTP-server should have 2
components:
• User-agent (UA)
• Local MTA
• Communication between sender and the receiver :
The sender’s user agent prepares the message and sends it to the
MTA. The MTA’s responsibility is to transfer the mail across the
network to the receiver’s MTA. To send mails, a system must
have a client MTA, and to receive mails, a system must have a
server MTA.
• SENDING EMAIL:
Mail is sent by a series of request and response messages
between the client and the server. The message which is sent
across consists of a header and a body. A null line is used to
terminate the mail header and everything after the null line is
considered as the body of the message, which is a sequence of
ASCII characters. The message body contains the actual
information read by the receipt.
 RECEIVING EMAIL:
The user agent at the server-side checks the mailboxes at a
particular time of intervals. If any information is received, it
informs the user about the mail.
 When the user tries to read the mail it displays a list of emails
with a short description of each mail in the mailbox. By
selecting any of the mail users can view its contents on the
terminal.
 Some SMTP Commands:
 HELO – Identifies the client to the server, fully qualified
domain name, only sent once per session
 MAIL – Initiate a message transfer, fully qualified domain of
originator
 RCPT – Follows MAIL, identifies an addressee, typically the
fully qualified name of the addressee, and for multiple
addressees use one RCPT for each addressee
 DATA – send data line by line
Post Office Protocol
 The POP protocol stands for Post Office
Protocol. As we know that SMTP is used as a
message transfer agent.
 When the message is sent, then SMPT is used
to deliver the message from the client to the
server and then to the recipient server.
 But the message is sent from the recipient
server to the actual server with the help of the
Message Access Agent.
 The Message Access Agent contains two types
of protocols, i.e., POP3 and IMAP.
How is mail transmitted?
 Suppose sender wants to send the mail to receiver. First mail is
transmitted to the sender's mail server.
 Then, the mail is transmitted from the sender's mail server to the
receiver's mail server over the internet. On receiving the mail at the
receiver's mail server, the mail is then sent to the user.
 The whole process is done with the help of Email protocols. The
transmission of mail from the sender to the sender's mail server and
then to the receiver's mail server is done with the help of the
SMTP protocol.
 At the receiver's mail server, the POP or IMAP protocol takes the data
and transmits to the actual user.
 Since SMTP is a push protocol so it pushes the message from the client
to the server.
 As we can observe in the above figure that SMTP pushes the message
from the client to the recipient's mail server.
 The third stage of email communication requires a pull protocol, and
POP is a pull protocol.
 When the mail is transmitted from the recipient mail server to the client
which means that the client is pulling the mail from the server.
File Transfer Protocol (FTP)

 File Transfer Protocol(FTP) is an application layer protocol that moves


files between local and remote file systems. It runs on top of TCP, like
HTTP. To transfer a file, 2 TCP connections are used by FTP in parallel:
control connection and data connection.
 Why FTP?
 FTP is a standard communication protocol. There are various other
protocols like HTTP which are used to transfer files between
computers, but they lack clarity and focus as compared to FTP.
 Moreover, the systems involved in connection are heterogeneous
systems, i.e. they differ in operating systems, directories, structures,
character sets, etc the FTP shields the user from these differences and
transfers data efficiently and reliably.
 FTP can transfer ASCII, EBCDIC, or image files. The ASCII is the default
file share format, in this, each character is encoded by NVT ASCII.
 In ASCII or EBCDIC the destination must be ready to accept files in this
mode. The image file format is the default format for transforming
binary files.
Mechanism of File Transfer Protocol
Types of Connection in FTP
 Control Connection
 Data Connection

 1. 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.
 2. Data connection: For sending the actual file, FTP makes use of a data
connection. A data connection is initiated on port number 20.

FTP sends the control information out-of-band as it uses a separate control
connection. Some protocols send their request and response header lines
and the data in the same TCP connection.
 For this reason, they are said to send their control information in-band.
 HTTP and SMTP are such examples.
• 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. Only one file can be sent over one data connection. But
the control connection remains active throughout the user
session. As we know HTTP is stateless i.e. it does not have to
keep track of any user state. But FTP needs to maintain a state
about its user throughout the session.
• FTP Clients
• FTP works on a client-server model. The FTP client is a program
that runs on the user’s computer to enable the user to talk to
and get files from remote computers. It is a set of commands
that establishes the connection between two hosts, helps to
transfer the files, and then closes the connection.
Cryptography And Network Security
 Cryptography is a term used in data communication that
refers to protecting the private information shared
between two parties.
 Network Security refers to securing and protecting the
network and data for ensuring the confidentiality of
data.
 What is Cryptography?
 Cryptography is a process of scrambling the
message(scrambling in the sense the plain text
converted into cipher text)
Cryptography generally deals with the study and
practice of techniques for ensuring secure
communication between two parties in the presence of
a third party called adversaries.
 Let us understand cryptography with the help of an
example. As we see in the above figure sender wants to
send a "hello" message and encryption is done on the
sender to convert the sender's message into unreadable
format(cipher text) using the encryption key.
 The message of the sender also known as plain text is
converted into an unreadable form by using a key ‘k’, that
unreadable resultant text is called cipher text.
 And this whole process is known as encryption. At the
receiver side cipher text is received and that cipher text is
again converted into plain text using the decryption key.
 Decryption is the reverse process of encryption. In
decryption, at the receiver end cipher text is converted
into plain text using the key, so the receiver can
understand it.
 The Main principles of cryptography are
Confidentiality, Data Integrity, Authentication, Non-
repudiation
 Confidentiality refers to rules and regulations that
make sure that the data is restricted to certain people
or certain places.
 Data integrity ensures that data remains accurate and
consistent over its whole transmission process.
 Authentication ensures that the data is being claimed
by the person who is related to it.
 Non-repudiation ensures that a person or a party
related to the transmission process cannot deny the
authenticity of their signature on the data or the
transmission of a message.
What is Network Security?
• Network Security generally refers to action taken by an enterprise or
organization to protect and secure its computer network and data. The main
aim is to ensure the confidentiality and accessibility of the network and
data.
• Below image to show the network security model:
 The network security model represents the secure
communication between sender and receiver.
 This model depicts how the security service has been
implemented over the network to prevent the opponent
from causing a threat to the authenticity or confidentiality
of the data that is being communicated through the
network.
 Network security covers a huge amount of technologies,
devices and processes
 In simple words, it is a set of rules and regulations designed
for protecting and securing the integrity, confidentiality and
accessibility of data and computer networks.
 The most common example of network security is
password protection which was chosen by itself.
Applications of Cryptography and Network Security
 Authentication/Digital Signatures
 Time Stamping
 Electronic Money
 Encryption/Decryption in email
 WhatsApp Encryption
 Instagram Encryption
 Sim card Authentication

 Network Security Applications


 Protection of network.
 Protection from intrusions.
 To protect from threats.
 Protection of data from breaches
Data encryption standard (DES)

 Data encryption standard (DES) has been found vulnerable


to very powerful attacks and therefore, the popularity of
DES has been found slightly on the decline.
 DES is a block cipher and encrypts data in blocks of size
of 64 bits each, which means 64 bits of plain text go as the
input to DES, which produces 64 bits of ciphertext.
 The same algorithm and key are used for encryption and
decryption, with minor differences. The key length is 56
bits.
 We have mentioned that DES uses a 56-bit key. Actually,
The initial key consists of 64 bits.
 However, before the DES process even starts, every 8th bit
of the key is discarded to produce a 56-bit key. That is bit
positions 8, 16, 24, 32, 40, 48, 56, and 64 are discarded.
 The DES algorithm steps are given below:
 The process begins by giving 64-bit plain text as input to an initial
permutation function (IP).
 The initial permutation (IP) is then carried out on plain text.
 The initial permutation (IP) generates two halves of the permuted block,
known as RPT (Right Plain Text) and LPT (Left Plain Text).
 Each Left Plain Text (LPT) and Right Plain Text (RPT) is encrypted through 16
rounds.
This encryption process consists of five stages:
 Key Transformation
 Expansion permutation
 S-box permutation
 P-box permutation
 XOR & Swap
 Finally Left Plain Text (LPT) is combined with Right Plain Text (RPT). After
that, on the newly combined block generated, a final permutation is
performed.
 The output of this process will produce a 64-bit ciphertext.
 The method of decryption uses the same algorithm, but it is done in reverse
order of the same key as the DES algorithm is the symmetric key algorithm.

You might also like