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
| Feature | HTTP | HTTPS |
|---|---|---|
| Security | Not secure | Secure |
| Encryption | No | Yes |
| Port | 80 | 443 |
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
| Protocol | Function |
|---|---|
| SMTP | Sending mail |
| POP3 | Receiving mail (download) |
| IMAP | Receiving 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
| Protocol | Security |
|---|---|
| TELNET | Not secure |
| SSH | Secure |
Real-Life Example: Controlling your office computer from home.
Comparison of Application Layer Protocols (Very Important)
| Service | Protocol |
|---|---|
| Web browsing | HTTP / HTTPS |
| Email sending | SMTP |
| Email receiving | POP3 / IMAP |
| File transfer | FTP |
| Name resolution | DNS |
| Remote login | TELNET / SSH |
Application Layer in OSI vs TCP/IP
| OSI Model | TCP/IP Model |
|---|---|
| Application | Application |
| 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.
| Goal | Meaning |
|---|---|
| Confidentiality | Only authorized users can read data |
| Integrity | Data should not be altered |
| Authentication | Verify sender/receiver identity |
| Non-Repudiation | Sender 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.
| Area | Example |
|---|---|
| Banking | ATM, net banking |
| E-commerce | Online shopping |
| Communication | WhatsApp, Email |
| Authentication | Digital signatures |
| Security | Password protection |
Cryptographic Attacks
A cryptographic attack is an attempt to break the security of encrypted data.
Types of Attacks
| Attack Type | Explanation |
|---|---|
| Brute Force Attack | Trying all possible keys |
| Cipher Text Attack | Only encrypted data available |
| Plain Text Attack | Attacker knows some original data |
| Man-in-the-Middle | Attacker intercepts communication |
| Replay Attack | Reusing 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
| Feature | Description |
|---|---|
| Speed | Fast |
| Keys | Single key |
| Security | Less 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
| Feature | Description |
|---|---|
| Keys | Two keys |
| Security | Highly secure |
| Speed | Slower |
Examples of Algorithms
- RSA
- DSA
- ECC
Difference Between Public Key and Private Key Cryptography
| Basis | Private Key | Public Key |
|---|---|---|
| Keys Used | One key | Two keys |
| Speed | Fast | Slow |
| Security | Less secure | More secure |
| Example | AES | RSA |
Cryptography Process (Overall)
- Sender encrypts data
- Data travels securely
- 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.