You are on page 1of 14

# Encryption/Decryption

Algorithms

## Dhiraj Kumar Jha (BCT/062/405)

dhiraj405@gmail.com

What is Encryption?
 Plaintextor clear text: message
sent by the communicator
 Process of encoding in such a
way that the outsiders can’t read
is encryption
 Cipher text: Encrypted message
Why Encryption?
 Internet has a threatening
danger.
 Unauthorized use of unethical
communication over Internet so
risky.
What is Decryption?
Exactly the opposite of
ENCRYPTION
The sender encodes the plaintext
into cipher text (ENCRYPTION)
The receiver, in turn, needs to
convert into the plain text to
understand the meaning of the
message.
Well Known Algorithms
 Caesar (Rot 13),
 Base64,
 MD5,
 SHA-1
 RC4, RC5, DES,3DES, Blowfish,
Diamond2, RSA, Rijndael
Encryption Algorithm, SHA-256
Caesar (Rot 13)
 Used to encrypt plain text
composed of alphabetical
characters only.
 Popularly known as Rot 13.
 Very weak algorithm
A B C D E F G H I J
1 2 3 4 5 6 7 8 9 10
K L M N O P Q R S T

11 12 13 14 15 16 17 18 19 20

U V W X Y Z
21 22 23 24 25 26
Algorithm
Let us encrypt Hello Dhiraj
Now first letter is H, start your
count 13 letters from it i.e. U.
Similarly for others.
But for O, we see, we reach Z
before reaching 13 count so we
will continue with A again. i.e. O
corresponds to B.
So, our cipher text is Uryyb
Quvenw
Decryption is same 13 is in
Base64
One of the most widely used and
popular.
Frequently used method for the
Binary data/printable string
conversion.
Method to convert 8-bit characters
to 7-bit characters, so that they can
be transferred over the Internet.
The Base64 system uses the
following table:
Code_table[0…63] =
“ABCD..XYZabcd…xyz012..9+/”
Algorithm (Base64)
Encoding
aim how-to encode
Step#2:convert into respective
ASCII values,
c(99),r(114),y(121)p(112)t(116),o(11
1),r(114),z(122),z(122).
 Step#3 convert the decimal
number into binary form
 99(01100011)114(01110010)121(0
1111001)…
Contd..
Step#4 all the binary equivalents
are joined or concatenated to
obtain a large set of binary
numbers
01100011011100100111100101
11000001110100011011110111
00100111101001111010.
Step#5 now divide into equal
sections only 6-bits, 12- such set
obtained
Contd…
Step#6 These 6-bit groups are now
converted into their equivalent
decimal number.
011000(24),110111(55),…
Step#7 now decimal equivalents
thus obtained are now changed into
their Base64 values, using Base64
alphabet chart
24(y),55(3),9(J)57(5),28(c)…
“cryptorzz” equivalent to
“Y3J5cHRvcnp6==“
“=“ is used as padding in Base64
encryption
IP Table
Iformation