Professional Documents
Culture Documents
Ch3 NIS
Ch3 NIS
Unit.3 Cryptography
C22620.c: Apply cryptographic algorithms and protocols to maintain Computer Security.
4.Steganography : Procedure
Cryptography:-
Cryptography is the science of
using mathematics to encrypt
and decrypt data.
Cryptography enables you to
store sensitive information or
transmit it across insecure
networks (like the Internet) so
that it cannot be read by anyone
except the intended recipient.
Substitution Transposition
Techniques Techniques
Caesar Cipher: This cryptosystem is generally referred to as the Shift Cipher. The
concept is to replace each alphabet by another alphabet which is ‘shifted’ by some
fixed number between 0 and 25.
For this type of scheme, both sender and receiver agree on a ‘secret shift number’
for shifting the alphabet. This number which is between 0 and 25 becomes the key
of encryption.
The name ‘Caesar Cipher’ is occasionally used to describe the Shift Cipher when
the ‘shift of three’ is used.
Encryption Method:
-Read Plaintext (pt)
For( int i=0; i < pt.length; i++)
-Enter key {
0<Key≤ 25 Int emp=
-Encrypt (pt) convert_to_number(pt,i);
-Show the cipher text (cp) Int c= (temp + k ) mod 26;
ct+= convert_to_letter(c);
-Decrypt cp }
-Show the original plain text
PT: R A M S W A R U P K
NO: 17 0 12 18 22 0 17 20 15 10
KEY: R A N C H O B A B A
NO: 17 0 13 2 7 14 1 0 1 0
Now add the number of Plain-Text and Key and after doing the addition and subtraction operation (if
required), we will get the corresponding Cipher-Text character number.
CT-NO: 34 0 25 20 29 14 18 20 16 10
In this case, there are two numbers which are greater than the 26
so we have to subtract 26 from them and after applying the subtraction operation the new Cipher text
character numbers are as follow:
CT-NO: 8 0 25 20 3 14 18 20 16 10
New Cipher-Text is after getting the corresponding character from the number.
CIPHER-TEXT: I A Z U D O S U Q K
DEPARTMENT OF COMPUTER ENGINEERING
Transposition Techniques: Simple Columnar Transposition.
Example:
•In this method plain text is written downwards on “rails of fence “ , starting a new
column when bottom is reached.
•Algorithm:
1. First write down plain text message as a sequence of diagonals.
2. Read the plain text written in first step as a sequence of rows.
Example:
Plain text: come home tomorrow
Types of Steganography
1. Text Steganography
2. Image Steganography
3. Audio Steganography
Symmetric-key cryptography
is based on sharing secrecy;
Asymmetric-key cryptography
is based on personal secrecy.
The Data Encryption Standard (DES) is a symmetric-key block cipher published by the
National Institute of Standards and Technology (NIST).
At the encryption site, DES takes a 64-bit plaintext and creates a 64-bit ciphertext;
At the decryption site, DES takes a 64-bit ciphertext and creates a 64-bit block of
plaintext.
The same 56-bit cipher key is used for both encryption and decryption.