0% found this document useful (0 votes)
28 views43 pages

Unit 5

The document explains various protocols and techniques related to email and data security, including POP and IMAP for email retrieval, remote login, data compression methods, and cryptography. It details the differences between symmetric and asymmetric key cryptography, with a focus on the RSA encryption scheme. Additionally, it covers data compression techniques, both lossless and lossy, and provides examples of how these methods are applied.

Uploaded by

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

Unit 5

The document explains various protocols and techniques related to email and data security, including POP and IMAP for email retrieval, remote login, data compression methods, and cryptography. It details the differences between symmetric and asymmetric key cryptography, with a focus on the RSA encryption scheme. Additionally, it covers data compression techniques, both lossless and lossy, and provides examples of how these methods are applied.

Uploaded by

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

POP

In simple terms, a user who wants to receive emails but does not have a permanent
connection to the internet uses a POP client to pull emails from the POP server.

In simple terms, a user who wants to receive emails but does not have a permanent
connection to the internet uses a POP client to pull emails from the POP server.

Requirement of POP
• We know that emails are stored on a centralised e-mail server, the SMTP server. The
SMTP server expects the destination host (i.e., the email recipient) to be online all
the time. Without this, it cannot create a TCP connection with it and, therefore,
cannot forward the email message to the destination host.
• As we know, desktop computers are usually powered down when the business hours
are over. Therefore, the solution to this problem is having a POP server, whereas the
SMTP server in an organization receives and stores all the incoming emails for any
user in that organization. It is not used for transporting the emails to the end
destination.
The POP server consults the user’s mailbox to perform this task shown in the figure
below −
Internet Message Access Protocol (IMAP)
• The Internet Message Access Protocol (IMAP) is an important part of how email works today. It lets
people check and manage their emails from different devices, like phones, tablets, and computers,
without losing any updates.
• Unlike the older Post Office Protocol (POP), which only downloads messages to one device, IMAP
keeps everything in sync across all devices. This means if you read, delete, or move an email on one
device, the changes show up everywhere. IMAP helps make email more organized, up-to-date, and
easy to use no matter where you are accessing the data.
• It is used as the most commonly used protocol for retrieving emails. This term is also known as
Internet mail access protocol, Interactive mail access protocol, and Interim mail access protocol.
• It retrieves messages from your email provider to your email client (such as on your Mac or PC).
Importantly, it does not delete messages from the email service after you download them until the
user explicitly deletes them.
• It allows you to view and manage your emails across multiple devices because it synchronizes the
emails between your email client and the server. This synchronization ensures that changes such
as read status, deletions, and folder organization are reflected consistently across all devices
connected to the same email account.
Features of IMAP

•Multi-Mailbox Management: It supports the management of multiple mailboxes, allowing users to


organize their emails into various categories or folders.
•Message Flags: It provides the ability to add message flags, helping users keep track of the status
of emails, such as whether they have been read.
•Selective Email Retrieval: It allows users to decide whether to download the full content of an
email, or just retrieve the headers and decide later.
•Efficient Media Management: When multiple files are attached to an email, IMAP simplifies the
process of downloading media files by handling attachments efficiently.
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.
Data Compression
Data compression is defined as the process whereby information is encoded in less bits than it had
originally occupied. This mainly happens through methods that eliminate duplication and other extraneous
information.
Compression techniques are useful for reducing file sizes for storage, minimizing bandwidth during
transmission and enabling faster uploading/downloading of web content over the internet.

Examples of Data Compression


•Text compression: Where text files are compressed using algorithms, such as Huffman coding so that
the size decreases.
•Image Compression: The JPEG format compresses images by reducing resolution and color depth.
•Audio Compression: MP3 format compresses audio by eliminating inaudible frequencies.
Data Compression Techniques
Data compression can be divided into two categories: lossless and lossy.

Lossless Data Compression


Lossless data compression guarantees that the decompressed data is identical to the original
data. It works best for text and data files where precision matters.
•Huffman coding: Uses a frequency-sorted binary tree to locate values efficiently.
•Run-length encoding (RLE): This compresses sequences of replicated data values.
•Lempel-Ziv-Welch (LZW): It creates a dictionary of data patterns and replaces them with shorter
codes.

Lossy Data Compression


Lossy data compression gives away the accuracy of some of its input data for a better
compression ratio. It is usually applied to multimedia files, where some loss of detail can be
tolerated. Some techniques include:
•Transform Coding: Uses mathematical transforms that shrink the data, usually in JPEG
•Quantization: Reducing the precision of data; it is common in image and video compression.
Cryptography
Cryptography is a technique of securing information and communications using codes to ensure
confidentiality, integrity and authentication.

Plaintext and Ciphertext : The original message, before being transformed, is called plaintext. After
the message is transformed, it is called ciphertext. An encryption algorithm transforms the plaintext
into ciphertext; a decryption algorithm transforms the ciphertext back into plaintext. The sender uses
an encryption algorithm, and the receiver uses a decryption algorithm.
Cipher: We refer to encryption and decryption algorithms as ciphers. The term cipher is also used to
refer to different categories of algorithms in cryptography.
Key: A key is a number (or a set of numbers) that the cipher, as an algorithm, operates on. To encrypt
a message, we need an encryption algorithm, an encryption key, and plaintext. These create the
ciphertext. To decrypt a message, we need a decryption algorithm, a decryption key, and the
ciphertext. These reveal the original plaintext.
There are two types of cryptography which are as follows

Symmetric Key Cryptography:


Symmetric Key Cryptography 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) .
Asymmetric Key Cryptography:

In Asymmetric Key Cryptography , a pair of keys is used to encrypt and decrypt information. A sender’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
holds his private key. The most popular asymmetric key cryptography algorithm is the RSA algorithm.
.
RSA
RSA (Rivest-Shamir-Adleman) is a famous encryption scheme that makes use of a
combination of public and private keys. This means you have a non-public key and one that
can be shared publicly. Each key can be used to encrypt data, but only the opposite can be
decrypted. RSA was evolved in 1977 via MIT researchers Ron Rivest, Adi Shamir and Leonard
Adleman, whose name bears the set of ruless call.
Working of RSA :
• RSA is based on the problem of breaking down large numbers into their top factors. To
create an RSA key pair, you need to pick very big prime numbers, p and q. It is crucial to
pick those primes randomly and ensure they are simply unique from each different. The
product of p and q, represented as n, becomes the modulus for the public and private
keys. While n is publicly known, the values of p and q remain confidential.
• The carmecheals' totient function of the product of two primes, p and q, is computed. An
integer, e, is chosen as the public exponent. The final step involves calculating d, which
serves as the private exponent.

Example
Let's say we choose p = 61 and q = 53.
n = p * q = 61 * 53 = 3233
(n) = (p-1)(q-1) = 60 * 52 = 3120
Let's choose e = 17 (a common choice).
d = 2753 (computed such that (17 * d) mod 3120 = 1)
So, the public key is (3233, 17), and the private key is (3233, 2753).
Encryption: To encrypt a message, the sender Uses the public key (n, e) provided by the
recipient. Converts the plaintext message (m) into a ciphertext (c) using the formula −
c = m^e mod n.
Suppose we want to encrypt the message "HELLO". We convert it to ASCII: H(72) E(69) L(76)
L(76) O(79).
We will encrypt each ASCII value separately −
•H: C = 72^17 mod 3233 = 2103
•E: C = 69^17 mod 3233 = 2464
•L: C = 76^17 mod 3233 = 2190
•L: C = 76^17 mod 3233 = 2190
•O: C = 79^17 mod 3233 = 875

Decryption: Once the ciphertext (c) is received, the recipient uses their private key (n, d) to
decrypt the message. Computes the plaintext message (m) using the formula −
m = c^d mod n.
The recipient receives the ciphertext (2103, 2464, 2190, 2190, 875).
They use their private key to decrypt each value −
•M = 2103^2753 mod 3233 = 72 (H)
•M = 2464^2753 mod 3233 = 69 (E)
•M = 2190^2753 mod 3233 = 76 (L)
•M = 2190^2753 mod 3233 = 76 (L)
•M = 875^2753 mod 3233 = 79 (O)
So, the decrypted message is "HELLO".

You might also like