0% found this document useful (0 votes)
31 views7 pages

What Is Cryptography

Uploaded by

Nitu
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)
31 views7 pages

What Is Cryptography

Uploaded by

Nitu
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/ 7

What is Cryptography ?

Cryptography is a cyber security technique that protects information and communications


by encoding messages so that only the intended recipient can read them. It's a vital tool
for preventing unauthorized access, data tampering, and eavesdropping.
Here are some ways cryptography is used in cyber security:
Confidentiality: Cryptography ensures that only the intended recipient can access and
read the information.
Data integrity: Cryptography ensures that the encoded data cannot be modified or
tampered with without leaving traceable marks.
Authentication : Cryptography verifies the identity of both the sender and the receiver
of the information.
Non-repudiation: Cryptography makes senders accountable for their messages since
they cannot later deny that the message was transmitted.

What is Caesar cipher ?


The Caesar cipher is an ancient encryption technique that's used to replace letters in a
message with other letters or symbols by shifting them a fixed number of positions in the
alphabet. The Caesar cipher is a type of substitution cipher, where one letter is substituted
for another in a consistent fashion. The key for this cipher is a letter which represents the
number of place for the shift. For example, a key D means “shift 3 places” and a key M
means “shift 12 places”.

How It Works:
Each letter in the plaintext is shifted by a predetermined number of positions (the "key").
For example, with a shift of 3, "A" becomes "D," "B" becomes "E," and so on.
The same shift is applied throughout the entire message, and decryption simply reverses
the shift.

Advantages
 The Caesar Cipher is very easy to understand and implement, requiring only a
basic shift in letters.
 It introduces beginners to basic encryption principles like substitution and key-
based encoding.
 Since the Caesar Cipher can be done manually without complex algorithms or
computational power, it’s accessible in low-tech environments.
Disadvantages
 The Caesar Cipher is highly vulnerable to brute-force attacks, as there are only 25
possible shifts. Even without a key, it can be broken quickly by testing all shifts.
 Since each letter is consistently shifted, the original letter frequency remains
largely unchanged, allowing attackers to decode the message by analyzing letter
frequencies.
 The use of a single shift key makes it predictable, and patterns in the ciphertext can
quickly reveal the encryption method.
 Due to its simplicity and low security, it is unsuitable for any real-world
applications where strong encryption is needed.

What is Monoalphabetic Cipher?


Monoalphabetic Cipher is a part of the substitution technique in which a single cipher
alphabet is used per message. Monoalphabetic cipher converts plain text into cipher text
and re-convert a cipher text to plain text. Monoalphabetic Cipher eliminates the brute-
force techniques for cryptanalysis. Moreover, the cipher line can be a permutation of the
26 alphabetic characters.
Advantages of Monoalphabetic Cipher:
 Better Security than Caesar Cipher.
 Provides Encryption and Decryption to data.
 Monoalphabetic Cipher maintains a frequency of letters.
Disadvantages of Monoalphabetic Cipher
 Monoalphabetic ciphers are easy to break because they reflect the frequency data of the
original alphabet.
 Prone to guessing attack using the English letters frequency of occurrence of letters.
 The English Language is used so the nature of plain text is known.
 Less secure than a polyalphabetic cipher.
How It Works :
1. Creating the Cipher Alphabet:
 First, you define a substitution key or a "cipher alphabet." This is typically a
rearranged version of the standard alphabet.
 For example, if the regular alphabet is
ABCDEFGHIJKLMNOPQRSTUVWXYZ, a possible cipher alphabet could
be QWERTYUIOPASDFGHJKLZXCVBNM.
 Here, every letter in the original alphabet maps directly to a letter in the cipher
alphabet.

2. Encrypting the Message:


 To encrypt a message, each letter in the plaintext is substituted with its
corresponding letter in the cipher alphabet.
 For instance, if your plaintext is "HELLO" and you use the cipher alphabet
from above:
H becomes I
E becomes T
L becomes S
O becomes G
 The encrypted message (ciphertext) would be "ITSSG."

3. Decrypting the Message:


 To decrypt, you simply reverse the process. Each letter in the ciphertext is
substituted back to its corresponding letter in the original alphabet.

Example
Suppose you use this mapping:
Plaintext alphabet: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Cipher alphabet: Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
If your plaintext message is "CHATGPT," the encrypted message would be:
C becomes X
H becomes S
A becomes Z
T becomes G
G becomes T
P becomes K
T becomes G
So the cipher text is "XSZGTKG."
What is polyalphabetic cipher ?
A polyalphabetic cipher is a type of encryption technique that uses multiple alphabets to
substitute letters in a message, making it more secure than a monoalphabetic cipher. This
technique is used in cyber security to make it more difficult for third parties to decipher
messages.

How it Works :
In a polyalphabetic cipher, each letter in the plaintext is encrypted with a different part of
the key, often by shifting letters according to a set pattern. A common example is the
Vigenère cipher, where each letter in the plaintext is shifted based on the corresponding
letter in a repeating keyword.
Advantages
 Compared to monoalphabetic ciphers, polyalphabetic ciphers are harder to
break using frequency analysis because letters are not always encrypted the
same way.
 The use of multiple alphabets adds complexity without needing advanced
algorithms, making it relatively simple but effective.
 They offer more resistance to brute force and statistical attacks, as they disguise
letter frequency patterns.
Disadvantages
 It requires both the sender and receiver to agree on a key and securely exchange it,
which can be challenging.
 The security of the cipher depends on the key length; short keys make it easier for
attackers to spot patterns, while long keys are harder to remember and manage.
 If part of the plaintext is known, it can help attackers decode the message,
especially if the key is short or repeated.

What is one-time pad cipher?


A one-time pad (OTP) is a cryptographic system that uses a randomly generated key to
encrypt a message that can only be used once.

How It Works:

 The OTP cipher uses a random key that is as long as the message itself.
 Each character of the plaintext is combined with the corresponding character in the
key, often using bitwise XOR in digital OTPs.
 The key is used only once and then discarded.
Advantages:
 If the key is truly random, as long as the message, and kept completely secret, the
OTP is theoretically unbreakable.
 The ciphertext reveals no information about the plaintext without the key, so
attackers cannot use frequency analysis or any other statistical technique to
decipher it.
 Despite its high security, the OTP uses simple operations (like XOR), making it
efficient for certain applications.
Disadvantages:
 The key must be as long as the message, and securely shared between sender and
receiver, which can be impractical.
 Each key can only be used once; reusing a key for multiple messages completely
compromises security.
 Generating truly random keys is challenging, especially for long messages, and
using non-random keys weakens the cipher.
 Both the sender and receiver need to securely store large, unique keys, making it
difficult for widespread use.

What is playfair ?
The Playfair cipher is a manual encryption technique used in cyber security that encrypts
messages by substituting pairs of letters, or digrams, instead of individual letters.
How It Works :

 A 5x5 grid is created using a keyword, filling in the grid with unique letters
(typically combining I and J to fit the alphabet into 25 cells).
 The plaintext is divided into pairs of letters (digraphs).
 Each pair of letters is encrypted based on their positions in the grid, following
specific rules (e.g., same row, column, or forming a rectangle).

Advantages:
 By encrypting letter pairs, the Playfair Cipher obscures letter frequencies, making
it harder to break using frequency analysis.
 It’s relatively easy to construct and use the grid once a keyword is chosen, making
it accessible for manual encryption.
 The Playfair Cipher does not require computational power and is entirely manual,
which was advantageous in historical contexts and can be useful in resource-
limited settings.
Disadvantages:
 The Playfair Cipher can still be broken with enough ciphertext, as frequency
analysis can be applied to digraphs (pairs of letters), making it less secure than
modern ciphers.
 Both the sender and receiver need to agree on a keyword, which must be kept
secret, making it challenging to securely exchange the key.
 The longer the message, the more likely patterns will emerge, making it easier for
attackers to decode.
 It typically requires combining certain letters (like I and J), which can create
ambiguities and limit its use in messages requiring precise spelling.

What is Hill cipher ?


The Hill cipher is a symmetric encryption algorithm that uses matrix multiplication to
encrypt and decrypt data. It was invented by Lester S. Hill in 1929 and was the first
polygraphic cipher that could operate on more than three symbols at once.

How It Works

 The plaintext is divided into blocks (e.g., pairs or triples of letters).


 A matrix (key matrix) of the same size as each block is chosen and used as the
encryption key.
 Each block of plaintext is represented as a vector and multiplied by the key matrix,
with results typically reduced modulo 26 (for the 26 letters in the English
alphabet).
 The resulting encrypted vectors form the ciphertext.
Advantages:
 By encrypting blocks of letters rather than single letters, the Hill Cipher obscures
single-letter and digraph frequencies, making it much harder to break using
traditional frequency analysis.
 The matrix-based transformations add a layer of mathematical complexity that
strengthens the cipher against basic attacks.
 Block size can be adjusted (e.g., 2x2, 3x3) to balance encryption strength with
computational efficiency, allowing for scalable security.
 With simple linear algebra operations, the Hill Cipher is computationally efficient
and well-suited to implementation in digital systems.
Disadvantages:
 The key matrix must be invertible modulo 26 for decryption to work, which limits
the choice of keys and requires careful selection.
 If an attacker knows a few plaintext-ciphertext pairs, they can potentially solve for
the key matrix, compromising the security of the cipher.
 Encrypting large blocks requires a larger key matrix, which increases
computational complexity and makes key management harder.
 Longer messages with repeating blocks can reveal patterns, reducing security,
especially if padding or transformation isn’t used.

You might also like