Application Layer



 Application Layer (Computer Networks)

The Application Layer is the topmost layer of the OSI and TCP/IP models.
It provides services directly to the user and acts as an interface between user applications and the network.

In Simple Words

This layer allows users to send emails, browse websites, download files, and login remotely.

Real-Life Example: Like a reception desk in a hotel that interacts directly with guests.

Functions of Application Layer

  • User authentication
  • File transfer
  • Email services
  • Web access
  • Name resolution
  • Remote login

Domain Name System (DNS)

What is DNS?

DNS converts a domain name into an IP address.

Example

  • Domain name: www.google.com
  • IP address: 142.250.190.14

Computers understand IP addresses, not names.

Real-Life Example: Saving a contact name instead of remembering a phone number.

Advantages of DNS

  • Easy to remember names
  • Faster access
  • Distributed database

World Wide Web (WWW)

What is WWW?

WWW is a collection of interlinked web pages accessed using the internet.

Key Components

  • Web Browser (Client)
  • Web Server
  • Web Pages (HTML)
  • URLs

Example: Opening https://www.wikipedia.org

Hyper Text Transfer Protocol (HTTP)

What is HTTP?

HTTP is a protocol used to transfer web pages from server to client.

Features

  • Stateless protocol
  • Request–response based
  • Uses TCP

HTTP vs HTTPS

FeatureHTTPHTTPS
SecurityNot secureSecure
EncryptionNoYes
Port80443

Real-Life Example: Asking a librarian for a book and receiving it.

Electronic Mail (E-Mail)

What is E-Mail?

E-mail allows sending and receiving messages electronically over a network.

E-Mail Protocols

ProtocolFunction
SMTPSending mail
POP3Receiving mail (download)
IMAPReceiving mail (sync)

Components of E-Mail

  • Sender
  • Receiver
  • Mail server
  • Message

File Transfer Protocol (FTP)

What is FTP?

FTP is used to upload and download files between client and server.

Features

  • Reliable file transfer
  • Uses TCP
  • Client–server model

Example: Uploading a website to a hosting server.

Remote Login (TELNET / SSH)

What is Remote Login?

Remote login allows a user to access another computer remotely.

Protocols Used

ProtocolSecurity
TELNETNot secure
SSHSecure

Real-Life Example: Controlling your office computer from home.

Comparison of Application Layer Protocols (Very Important)

ServiceProtocol
Web browsingHTTP / HTTPS
Email sendingSMTP
Email receivingPOP3 / IMAP
File transferFTP
Name resolutionDNS
Remote loginTELNET / SSH

Application Layer in OSI vs TCP/IP

OSI ModelTCP/IP Model
ApplicationApplication
Presentation
Session

TCP/IP combines three OSI layers into one.

Exam-Ready Short Notes (2–3 Marks)

  • DNS maps domain names to IP addresses
  • HTTP is a stateless protocol
  • FTP uses TCP for reliable transfer
  • SMTP is used for sending emails
  • SSH provides secure remote login

Important Exam Questions

  • Explain Application Layer and its functions
  • Describe DNS with example
  • Differentiate HTTP and HTTPS
  • Explain FTP and its uses
  • What is remote login?

Introduction to Cryptography

What is Cryptography?

Cryptography is the science of protecting information by converting it into a secret code so that only authorized people can read it.

In Simple Words

Cryptography means hiding information in a secure form.

Real-Life Example

Sending a locked letter:

  • Anyone can see the letter
  • Only the person with the key can read it

Goals of Cryptography

Cryptography is designed to achieve four main goals.

GoalMeaning
ConfidentialityOnly authorized users can read data
IntegrityData should not be altered
AuthenticationVerify sender/receiver identity
Non-RepudiationSender cannot deny sending data

Example

Online banking ensures:

  • Password secrecy (Confidentiality)
  • Correct amount transfer (Integrity)
  • User verification (Authentication)

Applications of Cryptography

Cryptography is widely used in daily life.

AreaExample
BankingATM, net banking
E-commerceOnline shopping
CommunicationWhatsApp, Email
AuthenticationDigital signatures
SecurityPassword protection

Cryptographic Attacks

A cryptographic attack is an attempt to break the security of encrypted data.

Types of Attacks

Attack TypeExplanation
Brute Force AttackTrying all possible keys
Cipher Text AttackOnly encrypted data available
Plain Text AttackAttacker knows some original data
Man-in-the-MiddleAttacker intercepts communication
Replay AttackReusing captured data

Real-Life Example: Trying all lock combinations until the door opens (Brute force).

Encryption

Encryption is the process of converting plain text into cipher text.

Formula: Plain Text + Key → Cipher Text

Example: HELLO → XQ#9@

Decryption

Decryption is the reverse process of encryption.

Formula: Cipher Text + Key → Plain Text

Types of Cryptography

A. Private Key Cryptography (Symmetric Key)

Definition

The same key is used for encryption and decryption.

Example: Locking and unlocking a door with the same key

Features

FeatureDescription
SpeedFast
KeysSingle key
SecurityLess secure for large networks

Examples of Algorithms

  • DES
  • AES
  • RC4

Public Key Cryptography (Asymmetric Key)

Uses two different keys:

  • Public Key (shared)
  • Private Key (secret)

Example

  • ATM card + PIN
  • Digital signatures

Features

FeatureDescription
KeysTwo keys
SecurityHighly secure
SpeedSlower

Examples of Algorithms

  • RSA
  • DSA
  • ECC

Difference Between Public Key and Private Key Cryptography

BasisPrivate KeyPublic Key
Keys UsedOne keyTwo keys
SpeedFastSlow
SecurityLess secureMore secure
ExampleAESRSA

Cryptography Process (Overall)

  1. Sender encrypts data
  2. Data travels securely
  3. Receiver decrypts data

Important Exam Points (Quick Revision)

  • Cryptography protects data from unauthorized access
  • Encryption converts data into unreadable form
  • Decryption restores original data
  • Symmetric key uses one key
  • Asymmetric key uses two keys

Important Exam Questions

  • Define cryptography and its goals
  • Explain encryption and decryption
  • Differentiate public key and private key cryptography
  • Explain cryptographic attacks
  • Write applications of cryptography

Final Summary

Cryptography is the backbone of modern digital security, ensuring safe communication, secure transactions, and data protection using encryption techniques and secure key management.