0% found this document useful (0 votes)
18 views37 pages

Computer Network - Unit 5

The document provides an overview of the Domain Name System (DNS) and the World Wide Web (WWW), explaining how DNS translates domain names into IP addresses and the hierarchical structure of name servers. It also distinguishes between the internet and WWW, detailing how web pages are accessed through browsers using HTTP and URLs. Additionally, it covers the history, advantages, and disadvantages of email as a communication tool, along with examples of email attacks.

Uploaded by

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

Computer Network - Unit 5

The document provides an overview of the Domain Name System (DNS) and the World Wide Web (WWW), explaining how DNS translates domain names into IP addresses and the hierarchical structure of name servers. It also distinguishes between the internet and WWW, detailing how web pages are accessed through browsers using HTTP and URLs. Additionally, it covers the history, advantages, and disadvantages of email as a communication tool, along with examples of email attacks.

Uploaded by

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

Application Layer(Unit 5)

Domain Name System (DNS) in Application Layer


The Domain Name System (DNS) is like the internet’s phone book. It helps you
find websites by translating easy-to-remember names (like www.example.com)
into the numerical IP addresses (like 192.0.2.1) that computers use to locate each
other on the internet. Without DNS, you would have to remember long strings of
numbers to visit your favorite websites.
What is the Need for DNS?
Every host is identified by the IP address but remembering numbers is very
difficult for people also the IP addresses are not static therefore a mapping is
required to change the domain name to the IP address. So, DNS is used to convert
the domain name of the websites to their numerical IP address.
Types of Domains
There are various kinds of domains:
Generic
Domains: .com(commercial), .Edu(educational), .mil(military), .org(nonprofit
organization), .net(similar to commercial) all these are generic domains.
Country Domain: .in (India) .us .us
Inverse Domain: if we want to know what is the domain name of the website. IP
to domain name mapping. So, DNS can provide both the mapping
for example, to find the IP addresses of google.com then we have to type
nslookup www.google.com
Organization of Domain
It is very difficult to find out the IP address associated with a website because
there are millions of websites and with all those websites, we should be able to
generate the IP address immediately, there should not be a lot of delays for that
to happen organization of the database is very important.
DNS Record: Domain name, IP address what is the validity? what is the time to
live? and all the information related to that domain name. These records are
stored in a tree-like structure.
Namespace: Set of possible names, flat or hierarchical. The naming system
maintains a collection of bindings of names to values – given a name, a resolution
mechanism returns the corresponding value.
Name Server: It is an implementation of the resolution mechanism.

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.

Hierarchy of Name Servers Root Name Servers: It is contacted by name servers


that can not resolve the name. It contacts the authoritative name server if name
mapping is not known. It then gets the mapping and returns the IP address to the
host.
Top-level Domain (TLD) Server: It is responsible for com, org, Edu, etc., and all
top-level country domains like uk, fr, ca, in, etc. They have info about authoritative
domain servers and know the names and IP addresses of each authoritative name
server for the second-level domains.
Authoritative Name Servers are the organization’s DNS servers, providing
authoritative hostnames to IP mapping for organization servers. It can be
maintained by an organization or service provider. In order to reach cse.dtu.in we
have to ask the root DNS server, then it will point out to the top-level domain
server and then to the authoritative domain name server which actually contains
the IP address. So the authoritative domain server will return the associative IP
address.

How DNS Works:


DNS Query: When a user types a domain name into a web browser, the browser
sends a DNS query to find the corresponding IP address.
DNS Resolver: The request goes to a DNS resolver (usually provided by your ISP).
The resolver checks if it has the IP address in its cache.
Root DNS Server: If not in cache, the resolver queries the root DNS server, which
directs it to the TLD (Top-Level Domain) DNS server (e.g., for .com, .org, etc.).
TLD DNS Server: The TLD server directs the resolver to the authoritative DNS
server for the domain.
Authoritative DNS Server: This server holds the correct IP address for the domain.
The resolver retrieves the IP address and returns it to the user’s browser.
Browser Connects: The browser can now connect to the web server using the IP
address and load the website.
Example:
Let’s look at an example of how DNS works when accessing the website
www.example.com.
User types www.example.com into the browser.
 The DNS resolver queries the root server, which refers it to the .com TLD
server.
 The .com TLD server directs the query to the authoritative server for
example.com.
 The authoritative server returns the IP address, say 93.184.216.34.
 The resolver sends this IP back to the user’s browser.
 The browser connects to 93.184.216.34 and displays the webpage.
DNS Hierarchy:
DNS has a hierarchical structure:
Root Level: The top of the hierarchy, represented as a dot (.).
Top-Level Domain (TLD): This includes familiar domain types
like .com, .org, .edu, .in.
Second-Level Domain: The domain name selected by the website owner, e.g.,
“google” in google.com.
Subdomain: Often used to organize different sections of a website, e.g., “mail”
in mail.google.com.
Types of DNS Queries:
Recursive Query: The DNS resolver takes full responsibility for resolving the
query. It will contact other DNS servers on behalf of the client.
Iterative Query: The DNS resolver returns the best answer it can (may point to
another server for further query).

What is World Wide Web?


World Wide Web, which is also known as a Web, is a collection of websites or web
pages stored in web servers and connected to local computers through the
internet. These websites contain text pages, digital images, audios, videos, etc.
Users can access the content of these sites from any part of the world over the
internet using their devices such as computers, laptops, cell phones, etc. The
WWW, along with internet, enables the retrieval and display of text and media to
your device.
The building blocks of the Web are web pages which are formatted in HTML and
connected by links called "hypertext" or hyperlinks and accessed by HTTP. These
links are electronic connections that link related pieces of information so that
users can access the desired information quickly. Hypertext offers the advantage
to select a word or phrase from text and thus to access other pages that provide
additional information related to that word or phrase.
A web page is given an online address called a Uniform Resource Locator (URL). A
particular collection of web pages that belong to a specific URL is called a website,
e.g., www.facebook.com, www.google.com, etc. So, the World Wide Web is like a
huge electronic book whose pages are stored on multiple servers across the
world.
Small websites store all of their WebPages on a single server, but big websites or
organizations place their WebPages on different servers in different countries so
that when users of a country search their site they could get the information
quickly from the nearest server.
So, the web provides a communication platform for users to retrieve and
exchange information over the internet. Unlike a book, where we move from one
page to another in a sequence, on World Wide Web we follow a web of hypertext
links to visit a web page and from that web page to move to other web pages. You
need a browser, which is installed on your computer, to access the Web.
Difference between World Wide Web and Internet:
Some people use the terms 'internet' and 'World Wide Web' interchangeably.
They think they are the same thing, but it is not so. Internet is entirely different
from WWW. It is a worldwide network of devices like computers, laptops, tablets,
etc. It enables users to send emails to other users and chat with them online. For
example, when you send an email or chatting with someone online, you are using
the internet.

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.

How the World Wide Web Works?


Now, we have understood that WWW is a collection of websites connected to the
internet so that people can search and share information. Now, let us understand
how it works!
The Web works as per the internet's basic client-server format as shown in the
following image. The servers store and transfer web pages or information to user's
computers on the network when requested by the users. A web server is a
software program which serves the web pages requested by web users using a
browser. The computer of a user who requests documents from a server is known
as a client. Browser, which is installed on the user' computer, allows users to view
the retrieved documents.

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.

HTTP(Hypertext Transfer Protocol)


HTTP stands for HyperText Transfer Protocol.
It is a protocol used to access the data on the World Wide Web (www).
The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
This protocol is known as HyperText Transfer Protocol because of its efficiency that
allows us to use in a hypertext environment where there are rapid jumps from one
document to another document.
HTTP is similar to the FTP as it also transfers the files from one host to another
host. But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no
control connection to transfer the files.
HTTP is similar to SMTP as the data is transferred between client and server. The
HTTP differs from the SMTP in the way the messages are sent from the client to
the server and from server to the client. SMTP messages are stored and
forwarded while HTTP messages are delivered immediately.
Features of HTTP:
Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server. When the server receives the
request, the server processes the request and sends back the response to the
HTTP client after which the client disconnects the connection. The connection
between client and server exist only during the current request and response time
only.
Media independent: HTTP protocol is a media independent as data can be sent as
long as both the client and server know how to handle the data content.
Stateless: HTTP is a stateless protocol as both the client and server know each
other only during the current request. Due to this nature of the protocol, both the
client and server do not retain the information between various requests of the
web pages.

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.

Uniform Resource Locator (URL)


A client that wants to access the document in an internet needs an address and to
facilitate the access of documents, the HTTP uses the concept of Uniform
Resource Locator (URL).
The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
The URL defines four parts: method, host computer, port, and path.
Method: The method is the protocol used to retrieve the document from a server.
For example, HTTP.
Host: The host is the computer where the information is stored, and the computer
is given an alias name. Web pages are mainly stored in the computers and the
computers are given an alias name that begins with the characters "www". This
field is not mandatory.
Port: The URL can also contain the port number of the server, but it's an optional
field. If the port number is included, then it must come between the host and
path and it should be separated from the host by a colon.
Path: Path is the pathname of the file where the information is stored. The path
itself contain slashes that separate the directories from the subdirectories and
files.

What is Electronic mail?


E-mail is defined as the transmission of messages on the Internet. It is one of the
most commonly used features over communications networks that may contain
text, files, images, or other attachments. Generally, it is information that is stored
on a computer sent through a network to a specified individual or group of
individuals.
Email messages are conveyed through email servers; it uses multiple protocols
within the TCP/IP suite. For example, SMTP is a protocol, stands for simple mail
transfer protocol and used to send messages whereas other protocols IMAP or
POP are used to retrieve messages from a mail server. If you want to login to your
mail account, you just need to enter a valid email address, password, and the mail
servers used to send and receive messages.
Email messages include three components, which are as follows:
Message envelope: It depicts the email's electronic format.
Message header: It contains email subject line and sender/recipient information.
Message body: It comprises images, text, and other file attachments.

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.

Different types of Email


Newsletters
Lead Nurturing:
Promotional emails
Standalone Emails
Onboarding emails
Plain-Text Emails
Welcome emails:

Examples of email attacks


Phishing
A form of fraud in which the attacks are the practice of sending fraudulent
communications that appear to come from a reputable entity or person in email
or other communication channels. Usually, it is done through the email; phishing
emails are used by attackers to steal sensitive data like credit card and login
information or to install malware on the victim's machine.
Spamming
Spam email is unsolicited bulk messages sent without explicit consent from the
recipient, which is also known as junk email. Since the 1990s, spam is a problem
faced by most email users and has been increasing in popularity. Obtained by
spambots, spam mail recipients have had their email addresses (automated
programs), which crawl the Internet to find email addresses. This is the dark side
of email marketing in which spammers use spambots to create email distribution
lists. Typically, an email is sent by a spammer to millions of email addresses with
the expectation that only a few numbers of an email address will respond or
interact with the message.
Spoofing
Email spoofing is an email message that could be obtained from someone or
somewhere other than the intended source.
Business email compromise (BEC):
A BEC is an exploit in which an authorized person or attacker hacks to a business
email account and spoofs the owner's identity to defraud the company, its
customers, partners of money. Often, an attacker simply creates an account with
an email address that is almost identical to one on the corporate network, which
creates trust between the victim and their email account.
What can be sent in an e-mail?
An email is a platform that enables users to communicate with each other. It
allows users to send text messages, including a file or other data on the e-mail all
over the world. It is also possible to attach a picture, word processor document,
PDF, program, movie, or any file stored on your computer in an e-mail. However,
due to some security issues, it may not be possible to send certain types of files
on the email; they need some additional steps. For example, the .exe file can be
blocked by many companies from being sent over the email, and you will need to
compress the file into a .zip file format.
What makes a valid e-mail address?
 Users need to follow the various rule that is given below to make valid email
address:
 A username followed by @ (the at sign) is most important for an email
address, which is followed by the domain name with a domain suffix.
Hence, an e-mail must have a username.
 The domain name cannot be longer than 254 characters, and the username
cannot be longer than 64 characters long.
 An email must have only one @ sign.
 An email should not have space and special characters like \ [ ] ( ) , : ; < >.
Sometimes, few symbols such as backslash, space, and quotation mark
work must be preceded with a forward slash. But these characters are not
allowed by some email providers.
 In the email, the email address and username cannot start or end with a
period.
 The two or more successive periods are not allowed in the email.

File Transfer Protocol (FTP) in Application Layer


What is File Transfer Protocol?
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, 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.

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.

Introduction to Remote Login


Remote Login is a process in which user can login into remote site i.e. computer
and use services that are available on the remote computer. With the help of
remote login, a user is able to understand result of transferring and result of
processing from the remote computer to the local computer.
It is implemented using Telnet.
Procedure of Remote Login :
When the user types something on local computer, then local operating system
accepts character.
Local computer does not interpret the characters, it will send them to TELNET
client.
TELNET client transforms these characters to a universal character set called
Network Virtual Terminal (NVT) characters and it will pass them to the local TCP/IP
protocol Stack.
Commands or text which is in the form of NVT, travel through Internet and it will
arrive at the TCP/IP stack at remote computer.
Characters are then delivered to operating system and which later on passed to
TELNET server.
Then TELNET server changes that characters to characters which can be
understandable by remote computer.
Remote operating system receives character from a pseudo-terminal driver, which
is a piece of software that pretends that characters are coming from a terminal.
Operating system then passes character to the appropriate application program.
NVT Character Set :
With NVT Character set, TELNET client translates characters into NVT form and
deliver to network.
TELNET server translates data and commands from NVT form to the other form
that will be understandable by remote computer.
NVT uses 2 sets of characters, one for data and other for control. Size of both
characters is 8-bit bytes.
For data, NVT is an 8-bit character set in which 7 lowest bits are same as ASCII and
highest order bit is 0.
For control characters, NVT uses an 8-bit character set in which the highest bit is
set to 1.

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.

These attacks pose a significant threat to the confidentiality, integrity, and


availability of encrypted data.
Types of Attack in Cryptography

Brute Force

Brute force cryptography attacks represent a relentless assault on encrypted


information, employing a systematic method of trying every possible key until the
correct one is found.
This method involves an exhaustive trial-and-error approach, making it time-
consuming but effective if encryption keys are weak or easily guessable.
Brute force attacks can target various cryptographic systems, including passwords,
encryption keys, and digital signatures.
To mitigate the risk of brute force attacks, employing strong and complex
encryption keys is imperative.
Longer and more intricate keys exponentially increase the time and computational
resources required for attackers to succeed.

Cipher Only Attack


Cipher-only attacks are a category of cryptography attacks where the adversary
possesses only the ciphertext without knowledge of the corresponding plaintext
or the encryption key.
In these attacks, the attacker aims to deduce meaningful information from the
ciphertext alone, assuming the cryptographic algorithm is known.
Unlike more complex attacks, cipher-only attacks leverage only the intercepted
encrypted information to uncover potential vulnerabilities in the encryption
process.
The effectiveness of cipher-only attacks relies heavily on the strength of the
encryption algorithm employed.
Robust cryptographic systems are designed to withstand such attacks, ensuring
that even with knowledge of the algorithm, deciphering the original information
without the key remains a formidable challenge.
These attacks underscore the importance of selecting secure encryption
algorithms that can withstand scrutiny even when the ciphertext is in the hands of
potential adversaries.

Known Plaintext Attack


Known plaintext attacks target cryptographic systems by exploiting the knowledge
of both the plaintext and its corresponding ciphertext.
In these attacks, adversaries aim to deduce the encryption key based on the
known relationship between certain plaintext and ciphertext pairs.

Chosen Plaintext Attack


Chosen plaintext attacks represent a sophisticated cryptographic threat where
intruders have the ability to select specific plaintexts and observe their
corresponding ciphertexts.
This type of attack aims to deduce information about the encryption key by
analyzing the outcomes of deliberately chosen input and output pairs.
In chosen plaintext attacks, attackers exploit their ability to manipulate the
encryption process, revealing patterns that may lead to the compromise of the
cryptographic system.
Key and Algorithm Attack
Key and algorithm attacks in cryptography target the vulnerability of the
encryption key or the underlying algorithm itself.
Criminals aim to exploit weaknesses in either the cryptographic key or the
algorithm, seeking unauthorized access to encrypted information.
In key attacks, the adversary focuses on compromising the encryption key, while
algorithm attacks aim to exploit flaws in the mathematical processes governing
encryption.
To counteract key and algorithm attacks, robust key management practices and
secure algorithms are crucial.
The strength of cryptographic systems lies in the complexity and unpredictability
introduced into both the encryption key and algorithm.
Replay Attacks
Replay attacks in cryptography involve the malicious retransmission of captured
data to gain unauthorized access or manipulate system behavior.
Attackers intercept and duplicate previously recorded data transmissions, aiming
to deceive the system into accepting replicated information as legitimate.
These attacks exploit the lack of mechanisms to distinguish between original and
duplicated data.
Preventing replay attacks necessitates the implementation of measures that can
detect and discard repeated or out-of-sequence data transmissions.
Time-stamping and sequence numbers are common techniques employed to
mitigate the risk of replay attacks.

Difference between Encryption and Decryption


Encryption is the process of converting a normal message (plain text) into a
meaningless message (ciphertext). Decryption is the process of converting a
meaningless message (ciphertext) into its original form (plaintext). The major
distinction between secret writing and associated secret writing is the conversion
of a message into an unintelligible kind that’s undecipherable unless decrypted.
whereas secret writing is the recovery of the first message from the encrypted
information.

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.

Why are Encryption and Decryption Important?


Encryption converts data into a format that is unreadable without a key, while
decryption reverses the process to make the data readable again.
Private key and public key of cryptography
Cryptography as a field emphasizes the need to guarantee secure communication
and data privacy. There are mainly two approaches available to perform this
operation: – Private Key Cryptography (RIC or Symmetric Key Cryptography) and
Public Key Cryptography (PKE or Asymmetric Key Cryptography). Although they
are used to protect information, they work differently and have certain benefits
and drawbacks. In this article, the key focus is on understanding the key aspects of
a private and public key as well as the advantages and disadvantages of using
them.

Cryptography is the science of secret writing to keep the data secret.


Cryptography is classified into symmetric cryptography, asymmetric cryptography,
and hashing.

What is a Private Key?


Private key Encryption, also termed as symmetric Key Encryption requires the key
that is used to lock and the key used to unlock the message. This key must be kept
concealed between the two communicating entities to have reasonable security.

Advantages of Private Key Encryption


Speed: These algorithms are faster as compared to asymmetric encryption
algorithms and hence used for encrypting large volumes of data.
Less Computational Power: In another way, it is advantageous since it requires
fewer calculations which makes it suitable for real-time use.
Limitations of Private Key Encryption
Key Distribution Problem: The first and perhaps the major limitation is how to
securely transfer the said key among the parties. The problem with this event is
that the key is useless if it is intercepted, meaning that the security is lost.
Scalability Issues: That is why as the number of the users raises key management
becomes more complicated and thus it is not very scalable for large systems.

What is Public Key?


Public Key Encryption, or Asymmetric Encryption, involves a pair of keys: There is
the public key that is relatively known and the private key which is kept secret.
While the public key where everyone can get it from the internet is for encoding
or encryption, the private key is employed for decoding, decryption.

Advantages of Public Key Encryption


Enhanced Security: The application of two keys means that there is no problem of
secure key distribution since with the public key anyone can encrypt the message
while the private key can only be known by the recipient.
Digital Signatures: The use of public key cryptography is employed to back up the
concept of digital signatures hence ensuring true and complete message.

Disadvantages of Public Key Encryption


Slower Performance: Asymmetric algorithms generally are slower and
considerably more resource-hungry as compared to symmetric algorithms.
Complexity: Another disadvantage that has been agreed upon is that the
management and application of public key infrastructure can be complicated.

Which Encryption Key Type Is More Secure?


It should therefore be appreciated that there solved security of encryption
methods is dependent on the application is use in. As mentioned earlier, public
Key encryption is more appropriate for key distribution as well as authentications
since it will be using two keys. However, the use of the private key for encryption
of data proves to be secure due to the increased speed and efficiency.

You might also like