0% found this document useful (0 votes)
85 views

Cryptography: by Mrs. Ankita Joshi

Here are the steps to solve the assignment: 1. Replace each alphabet with its 7-bit ASCII code: I -> 0100 0001 A -> 0100 0001 M -> 0100 1101 A -> 0100 0001 H -> 0100 1000 A -> 0100 0001 C -> 0100 0011 K -> 0100 1000 E -> 0100 0101 R -> 0100 1010 2. Add a 0 as the leftmost bit for each 8-bit pattern: 0100 0001 -> 0100 0001 0100 0001 -> 0100 0001 0100 1101 -> 0100 1101 0100 0001 -> 0100

Uploaded by

Deadpool
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)
85 views

Cryptography: by Mrs. Ankita Joshi

Here are the steps to solve the assignment: 1. Replace each alphabet with its 7-bit ASCII code: I -> 0100 0001 A -> 0100 0001 M -> 0100 1101 A -> 0100 0001 H -> 0100 1000 A -> 0100 0001 C -> 0100 0011 K -> 0100 1000 E -> 0100 0101 R -> 0100 1010 2. Add a 0 as the leftmost bit for each 8-bit pattern: 0100 0001 -> 0100 0001 0100 0001 -> 0100 0001 0100 1101 -> 0100 1101 0100 0001 -> 0100

Uploaded by

Deadpool
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/ 21

Cryptography

By Mrs. Ankita Joshi


Cryptography
• Cryptography is the art of achieving security
by encoding messages to make them non-
readable.
• Cryptanalysis is the technique of decoding
messages from a non-readable format back to
a readable format without knowing how they
were initially converted from readable format
to non-readable format.
• Cryptology is a combination of cryptography
and cryptanalysis.
Cryptography
• Cryptography was performed by using manual
techniques. The basic framework of
performing cryptography has remained more
or less the same, of course, with a lot of
improvements in the actual implementation.
• More importantly, computers now perform
these cryptographic functions/ algorithms,
thus making the process a lot faster and
secure.
Cryptography
• Cryptography is an automated numerical tool that
plays an essential role in network security. It provides
the confidentiality and integrity of data and supports
authentication and non-repudiation to the users.
• Cryptography can play some multiple roles in user
authentication. Cryptographic authentication systems
support authentication capabilities through the need
of cryptographic keys known or consumed only by
authorized entities.
• Cryptography also provides authentication through its
extensive use in other authentication systems.
Stream Cipher
• A stream cipher is a method of encrypting text
(to produce ciphertext) in which a
cryptographic key and algorithm are applied
to each binary digit in a data stream, one bit
at a time.
• Basic encryption requires three main
components:
– a message, document or piece of data
– a key
– an encryption algorithm
Stream Cipher
Stream Cipher
• Encryption :
For Encryption,
• Plain Text and Keystream produces Cipher Text
(Same keystream will be used for decryption.).
• The Plaintext will undergo XOR operation with
keystream bit-by-bit and produces the Cipher
Text.
• Example –
• Plain Text : 10011001
• Keystream : 11000011
• Cipher Text : 01011010
Stream Cipher
• Decryption :
For Decryption,
• Cipher Text and Keystream gives the original Plain
Text (Same keystream will be used for
encryption.).
• The Ciphertext will undergo XOR operation with
keystream bit-by-bit and produces the actual
Plain Text.
• Example –
• Cipher Text : 01011010
• Keystream : 11000011
• Plain Text : 10011001
What is Block Cipher?
• A block cipher is a symmetric cryptographic
technique that uses a shared, secret key to
encrypt a fixed-size data block. During
encryption, plaintext is used, and ciphertext is the
resultant encrypted text.
• A block cipher processes the data blocks of fixed
size. Usually, the size of a message is larger than
the block size. Hence, the long message is divided
into a series of sequential message blocks, and
the cipher operates on these blocks one at a
time.
What is Block Cipher?
• Using a shared, secret key, a block cipher
encrypts and decrypts its input one block rather
than one bit at a time. Padding is not required
because the block is fixed in size.
• This is a symmetric algorithm. It transforms
textual input into cyphertext using the shared key
during encryption (encrypted text). It employs
the same key to convert the cyphertext back to
the original plaintext during decryption. The
length of the output is the same as the length of
the input.
What is Block Cipher
Modes of Operations
• Electronic Code Book (ECB)
• Mode Cipher Block Chaining (CBC)
• Cipher Feedback (CFB) Mode
• Output Feedback (OCB) Mode
• Counter (CTR) Mode
Cryptanalysis
• Cryptology has two parts
namely, Cryptography which focuses on
creating secret codes and Cryptanalysis which
is the study of the cryptographic algorithm
and the breaking of those secret codes.
Cryptanalytic attacks
• To determine the weak points of a cryptographic
system, it is important to attack the system. This
attacks are called Cryptanalytic attacks.
• The attacks rely on nature of the algorithm and
also knowledge of the general characteristics of
the plaintext, i.e., plaintext can be a regular
document written in English or it can be a code
written in Java. Therefore, nature of the plaintext
should be known before trying to use the attacks.
Types of Cryptanalytic attacks
• Known-Plaintext Analysis (KPA) : In this type of
attack, some plaintext-ciphertext pairs are
already known. Attacker maps them in order to
find the encryption key. This attack is easier to
use as a lot of information is already available.
• Chosen-Plaintext Analysis (CPA) : In this type of
attack, the attacker chooses random plaintexts
and obtains the corresponding ciphertexts and
tries to find the encryption key. Its very simple to
implement like KPA but the success rate is quite
low.
• Ciphertext-Only Analysis (COA) : In this type
of attack, only some cipher-text is known and
the attacker tries to find the corresponding
encryption key and plaintext. Its the hardest
to implement but is the most probable attack
as only ciphertext is required.
• Man-In-The-Middle (MITM) attack : In this
type of attack, attacker intercepts the
message/key between two communicating
parties through a secured channel.
• Adaptive Chosen-Plaintext Analysis (ACPA)
: This attack is similar CPA. Here, the attacker
requests the cipher texts of additional
plaintexts after they have ciphertexts for some
texts.
Assignment
• Encrypt the following plain-text bit pattern
with the supplied key, using the XOR
operation, and state the resulting cipher-text
bit pattern.
Plain text 10011110100101010
Key 01000101111101101
• Transform the cipher text generated in the
above exercise back to the original plain text
Assignment
• Consider a plain text message I AM A HACKER.
Encrypt it with the help of the following
algorithm:
– Replace each alphabet with its equivalent 7-bit ASCII
code.
– Add a 0 bit as the leftmost bit to make each of the
above bit patterns 8 positions long.
– Swap the first four bits with the last four bits for each
alphabet.
– Write the hexadecimal equivalent of every four bits.
• Write a C program to perform the task of the
above exercise.

You might also like