Unit 3
Unit 3
on
Network And Information Security
(22620)
By
Ms.Pritee H. Raut
(Assistance Professor)
Cryptography
(MARKS-14)
Cryptography
Cryptography is technique of securing information and communications through use of codes so that
only those person for whom the information is intended can understand it and process it. Thus
preventing unauthorized access to information.
The prefix “crypt” means “hidden” and suffix graphy means “writing”.
Cryptography not only protects data from theft or alteration, but can also be used for user
authentication.
Plaintext
Original message is known as plaintext.
Cipher text
When plain text is codified with the help of algorithm , then the resultant message is known as ciphertext.
Encryption
Encryption is the process of translating plain text Into Cipher text
Decryption
Decryption is the process of translating Cipher text Into plain text
Cryptanalysis
• The art and science of breaking the cipher text is known as cryptanalysis.
• Cryptanalysis is also used during the design of the new cryptographic techniques to test
their security strengths.
Cryptology
a b c d e f g h i j k l m
0 1 2 3 4 5 6 7 8 9 10 11 12
n o p q r s t u v w x y z
13 14 15 16 17 18 19 20 21 22 23 24 25
Note: If we have to replace the letter ‘z’ then the next three alphabets counted after ‘z’ will be
‘a’ ‘b’ ‘c’. So, while counting further three alphabets if ‘z’ occurs it circularly follows ‘a’.
There are also some drawbacks of this simple substitution technique. If the hacker knows that
the Caesar cipher is used then to perform brute force cryptanalysis, he has only to try 25
possible keys to decrypt the plain text.
The hacker is also aware of the encryption and decryption algorithm.
Modified Caesar Cipher
In Modified Caesar Cipher the original plain text alphabets may not necessarily be three
places down the line, but instead it can be replaced by any other alphabet in the English set .
EX- ‘A’ can be replaced by any other alphabet in the English set i.e. B TO Z. So for each
alphabet in string we have 25 possibilities of replacement.
Transposition Techniques
Transposition technique does not replace alphabets from plaintext with other whereas; it performs
some permutation on alphabets of plaintext.
OR
Note that all white spaces have been removed from the plain text.
The cipher text is then read off by writing the top row first, followed by the bottom row:
Extension Task:
More complex Rail Fence Ciphers have more “rails”. For instance instead of writing the code over two
lines (“rails”) you can write over three or four or more lines. The number of lines used in a Rail Fence
Cipher is called the key.
Key = 3
Key = 4
Simple columnar transposition techniques(w-22)
The simple columnar transposition technique simply arranges the plain text in a sequence of
rows of a rectangle and reads it in a columnar manner.
c o r p o r
a t e b r i
d g e
Decide the column order for reading the message – let’s assume 1,3,5,2,4,6 is an order.
Now read the message in a columnar manner using the decided order. –
cipher text-
cadreeorotgpbri
Example2:
Now, put the plain text in the rectangle of a predefined size. For our example, the predefined size of the rectangle would be
3×4. As you can see in the image below the plain text is placed in the rectangle of 3×4. And we have also permuted the
order of the column.
Now, to obtain the cipher text we have to read the plain text column by column as the sequence of permuted column order.
So, the cipher text obtained by the columnar transposition technique in this example is:
In substitution cipher technique, the letters Transposition cipher technique does not
of plain text are replaced by other letters or substitute one symbol for another instead it
number or symbols. changes the location of the symbol.
Difficult to understand
Easy to understand
Steganography is the practice of hiding a secret message inside of (or even on top of) something that is
not secret. That something can be just about anything you want. These days, many examples of
steganography involve embedding a secret piece of text inside of a picture. Or hiding a secret message or
script inside of a Word or Excel document.
It is a form of covert communication and can involve the use of any medium to hide messages. It’s not a
form of cryptography, because it doesn’t involve scrambling data or using a key. Instead, it is a form of
data hiding and can be executed in clever ways. Where cryptography is a science that largely enables
privacy, steganography is a practice that enables secrecy
Different Types of Steganography
Text Steganography
Image Steganography
Audio Steganography
Video Steganography
Digital Watermarking
Visible Watermarking
Invisible Watermarking
What is Symmetric Encryption?
Symmetric encryption is a type of encryption where only one key or same key (a secret key) is used to both encrypt and decrypt
electronic information. The entities communicating via symmetric encryption must exchange the key so that it can be used in the
decryption process.
By using symmetric encryption algorithms, data is converted to a form that cannot be understood by anyone who does not possess the
secret key to decrypt it.
Once the intended recipient who possesses the key has the message, the algorithm reverses its action so that the message is returned to its
original and understandable form.
The secret key that the sender and recipient both use could be a specific password/code or it can be random string of letters or numbers
that have been generated by a secure random number generator (RNG).
For banking-grade encryption, the symmetric keys must be created using an RNG that is certified according to industry standards, such
as FIPS 140-2.
There are two types of symmetric encryption algorithms:
Block algorithms:- Set lengths of bits are encrypted in blocks of electronic data with the use of a specific secret key.
As the data is being encrypted, the system holds the data in its memory as it waits for complete blocks.
Stream algorithms:- Data is encrypted as it streams instead of being retained in the system’s memory.
Private key
Responsible for encrypting and decrypting data.
Remains private on the computer, never sent or shared
Only this key can decrypt the data encrypted using the public key
Digital Signature
Digital signature is an electronic signature.
Digital signature is used for authentication , non repudiation and message integrity. Not used
for confidentiality.
It is based on asymmetric key cryptography.
Digital Signature
The steps followed in creating digital signature are :
Message digest is computed by applying hash function(Algorithm) on the message and then message digest is
encrypted using private key of sender to form the digital signature.
Digital signature is then transmitted with the message.(message + digital signature is transmitted)
Receiver decrypts the digital signature using the public key of sender. (This assures authenticity, as only sender
has his private key so only sender can encrypt using his private key which can thus be decrypted by sender’s
public key).
The receiver now has the message digest.
The receiver Uses The Message Digest Algorithms, Which Is Used By sender To Generate A New Message
Digest
now, receiver will compare these two message digest, i.e. sender’s message digest and receiver’s message
digest.
If message digest are equal then the signature is valid else not
Symmetric Key Encryption Asymmetric Key Encryption
It only requires a single key for both encryption and It requires two key one to encrypt and the other one to
decryption. decrypt.
It is used when a large amount of data is required to transfer. It is used to transfer small amount of data.
Examples: 3DES, AES, DES and RC4 Examples: Diffie-Hellman, ECC, El Gamal, DSA and RSA