Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
CRYPTOGRAPHY
MEMBERS
 TUSHAR SWAMI
 TANISH GARG
 VIKAS PRASAD
 ANURAG AGGARWAL
ACKNOWLEDGEMENT
We would like to express our special thanks of gratitude to our teacher Dr. Paramjeet who gave us
the golden opportunity to present this wonderful presentation on the topic Cryptography,
which also helped us in doing a lot of Research and we came to learn new things. We are really
thankful to him.
OUTLINE
1. INTRODUCTION
2. PROCESSES INVOLVED
3. NEED FOR CRYPTOGRAPHY
4. TYPES
5. SYMMETRIC CRYPTOGRAPHY
6. ASYMMETRIC CRYPTOGRAPHY
7. DIFFERENCES
8. APPLICATIONS
9. CONCLUSION
WHAT
IS
CRYPTOGRAPHY?
INTRODUCTION
Cryptography is an art and science of “Secret Writing”.
It achieves security by encoding messages to make them unreadable.
This process is systematic and well
structured
R#5 %>&”m,:p0-S89!@>$
jhnlO0-$557
This a session on Crypt
ography and network s
ecurity
Cryptographic
System
Unreadable Message
Readable Message
People illegally try to decode other’s secret information for their benefit. This technique is
called cryptanalysis.
PROCESSES INVOLVED
Encryption
Decryption
 Encryption - coding information which could either
be a file or mail message in into cipher text a form
unreadable by anyone.
 Decryption - reverse process of converting encoded
data to its original un-encoded form, plaintext.
Its Cipher text Message is
Kl Ekdudw,
Krsh brxduhgrlqj ilqh.Krz derxw phhwlqj dw wkh w
udlq vwdwlrq wklv Iulgdb dw5 sp?Sohdvh ohwphn
qrz li lw lv rn zlwk brx.
Uhjdugv.
Ylslq
Plaintext Message
Hi Bharat,
Hope you are doing fine. How about meeting at
the train station this Friday at 5 pm? Please let
me know if it is ok with you.
Regards
Vipin
Plaintext
Shared
Secret Key
Ciphertext
Encryption
Algorithm
Plaintext
Shared
Secret Key
Ciphertext
Decryption
Algorithm
Secure Key-exchange Channel
Insecure channel
ISO 27002:2005 defines Information Security as the
preservation of:
– Confidentiality
information is accessible only to those
authorized to have access
– Integrity
Safeguarding the accuracy and complet
eness of information and processing
methods
– Availability
authorized users can access information
and associated assets whenever required
TRADITIONAL TECHNIQUES
TRADITIONAL CRYPTOGRAPHY
Plaintext? 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
Ciphertext? 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
Value? 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Here we assign Numerical Values to each alphabet (lower or upper a to z)
as shown.
The lower case is used for plaintext and upper case is used for ciphertext.
ADDITIVE CIPHER
•The Encryption Algorithm adds the key to the plaintext Char.
•The Decryption Algorithm subtracts the key from Character.
•All operations are done using modulo 26.
ADDITIVE CIPHER
Problem1: Use the additive cipher with key = 15 to encrypt the message “hello”.
We apply the encryption algorithm to the plaintext, character by character as shown:
Solution:
Plaintext: h ---> 07 Encryption (07+15=22)mod 26 Ciphertext: 22--- > W
Plaintext: e ---> 04 Encryption (04+15=19)mod 26 Ciphertext: 19--- > T
Plaintext: l ---> 11 Encryption (11+15=26)mod 26 Ciphertext: 00--- > A
Plaintext: l ---> 11 Encryption (11+15=26)mod 26 Ciphertext: 00--- > A
Plaintext: o ---> 14 Encryption(14+15=29)mod 26 Ciphertext: 03--- > D
Therefore, the plaintext “hello” is encrypted to ciphertext “WTAAD”
MULTIPLICATIVE CIPHER
AFFINE CIPHER
•Affine Cipher is a combination of Additive and Multiplicative Ciphers with a pair of
keys as shown in fig.
•The first key k1 is used with the multiplicative cipher and the second key k2 is
used with the additive cipher.
•The keys are applied one after another.
VIGENERE CIPHER
• Vigenere cipher was designed by Blaise de Vigenere, It uses a scheme to create
the key stream.
• The stream is repetition of an initial secret key stream of length, m, where
1≤ m ≥26
• The cipher can be described as below where (k1,k2,k3….km) is the initial secret
key agreed to by Alice and Bob.
P=P1P2P3……….. C=C1C2CK………….
PK=[(k1,k2………..,km)(k1k2…….km)….]
Encryption: Ci=(Pi+ki)mod26 Decryption: Pi=(Ci-ki)mod26
VIGENERE CIPHER
Problem: Encrypt the plaintext “ She is listening” using the 6 character keyword
“ PASCAL”( value = 15,00,18,02, 00,11).
Solution: The initial key is PASCAL(Value is 15,00,18,20,00,11). The key stream is the
repetition of the initial key stream (as many as can be needed). The Cipher text is fou
nd as shown:
P=P1P2P3……….. C=C1C2CK…………. PK=[(k1,k2………..,km)(k1k2…….km)….]
Encryption: Ci=(Pi+ki)mod26 Decryption: Pi=(Ci-ki)mod26
Plaintext? 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
Ciphertext? 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
Value? 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
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
A 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
B 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 A
C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z Z 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
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
A 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
B 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 A
C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z Z 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
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
A 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
B 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 A
C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z Z 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
Plaintext: s h e i s l i s t e
P’s Values: 18 07 04 08 18 11 08 18 19 04 13
Key Stream: 15 00 18 02 00 11 15 00 18 02 00
C’s Values: 07 07 22 10 18 22 23 18 11 06 13
Ciphertext: H H W K S W X S L G N
PROBLEMS WITH TRADITONAL
o Very basic techniques.
o So easy to crack.
o Security level – very low.
o Doesn’t support the encryption of special characters
o Hence after 1950s, various other cryptography techniques were invented.
Hill Cipher
• Based on linear algebra.
• Each letter is represented by a numbe
r modulo 26.
• To encrypt a message, each block of
n letters is multiplied by an invertible
n × n matrix
• To decrypt the message, each block is
multiplied by the inverse of the matrix
used for encryption.
• Vulnerable to a known-plaintext attack
Consider the message
'ACT’,
The key
(GYBNQKURP ):
Thus the enciphered vector is given
by:
which corresponds to a ciphertext of
'POH’.
Bifid Cipher
 Combines the Polybius s
quare with transposition,
and uses fractionation to
achieve diffusion.
 First, a mixed alphabet
Polybius square is
drawn up
1 2 3 4 5
1 B G W K Z
2 Q P N D S
3 I O A X E
4 F C L U M
5 T H Y V R
 The message is converted
to its coordinates
F L E E A T O N C E
4 4 3 3 3 5 3 2 4 3
1 3 5 5 3 1 2 3 2 5
 They are then read out in
rows:
4 4 3 3 3 5 3 2 4 3 1 3 5 5 3 1 2 3 2 5
 Then divided up into pairs
again4
4
3
3
3
5
3
2
4
3
1
3
5
5
3
1
2
3
2
5
U A E O L W R I N S
Playfair Cipher
• Preparing the Key:
Alphabet Square
– present with an alphabet squar
e
– 5*5
– No repeat letter
– No Js
 Encrypts pairs of letters (bigrams or digrams), i
nstead of single letters
 More complex system
 Rules:
 letters appear on the same row: replace them
with the letters to their immediate right
 letters appear on the same column: replace th
em with the letters immediately below
 not on the same row or column:replace them
with the letters on the same row but at the ot
her pair of corners of the rectangle defined by
the original pair.
Playfair cipher Example:
• Using "playfair example" as the key,
the table becomes (omitted letters
in red):
• Encrypting the message "Hide the gold in
the tree stump" (note the null "X" used to
separate the repeated "E"s).
• HI DE TH EG OL DI NT HE TR EX ES TU MP
 Thus the message "Hide the gold in the tree stump" becomes "BMODZ BXDNA BEKUD MUIXM M
OUVI F". (Breaks included for ease of reading the cipher text.)
Playfair cipher Example(cont.):
Decipher
:
 Shift up and left instead of down and right
 Drop extra X
 Locate any missing any “I”s that should be “J”s
 Back into the original readable message
Enigma Machine
• Enigma is actually a brand of cipher machi
nes, not a single machine
• Most were created before and during WWll
• They were used to send encrypted messag
es among Hitler’s army
• Has three rotating rotors, a plugboard and
a reflector.
• Combination of mechanical and electrical
subsystems.
• The mechanical subsystem consists of a ke
yboard; a set of rotating disks called rotors
arranged adjacently along a spindle; and o
ne of various stepping components to turn
at least one rotor with each key press.
How It Works?
• It is a combination of three rotating rotor (wheel).
• The inner rotor rotate one step after every single c
haracter is encrypted.
• The middle rotor rotate one step after the inner rot
or complete a round of rotation.
• Same for the outer rotor.
• The plugboard provides a customiz
able swapping of pairs letters both
before and after a character pas
sed through the rotors.
Electrical pathway
• When a key is pressed, one or more ro
tors move to form a new rotor configur
ation, and a circuit is completed.
• When encrypting a message starting A
NX..., the operator would first press th
e A key, and the D lamp might light, s
o D would be the first letter of the cip
hertext.
• Current flowed from the battery (1) ->
bi-directional keyboard switch (2) to th
e plugboard (3). Next, it passed throug
h the plug "A" (3) via the entry wheel (
4) -> installed rotors (5), and entered t
he reflector (6).
• The reflector returned the current, via a
n entirely different path proceeding thr
ough plug "S" (7) connected with a cab
le (8) to plug "D"
SYMMETRIC CRYPTOGRAPHY
SYMMETRIC KEY CRYPTOGRAPHY
Where the key for both sender and receiver is same.
There are two types of Symmetric key cryptography:
1) STREAM CIPHER
Encrypts data character by character.
2) BLOCK CIPHER
Encrypts data block by block.
STREAM CIPHERS
Uses a fixed length key to produce a pseudo-random stream of bits in the form of
ones and zeroes.
Same key gives same stream of ones and zeroes.
XOR (exclusive OR) of key with plain text gives encryption.
XOR of the key with the cipher text will give decryption.
Some real world stream cipher systems are :
1)RC4
Used in WEP wireless network security.
One option in TLS/HTTPS for encrypting web
traffic.
STREAM CIPHERS
2)A5/1
Used in encrypting GSM phone data an
d conversation.
STREAM CIPHER ENCRYPTION
STREAM CIPHER DECRYPTION
Example:-
For encryption
o Plain text : 0110
o Key stream : 1100
o Cipher text : 1010
For decryption
o Cipher text : 1010
o Key stream : 1100
o Plain text : 0110
BLOCK CIPHERS
Type of symmetric key encryption.
Uses a fixed length to encrypt a fixed block of data.
Real world Block ciphers
DES (DATA ENCRYPTION STANDARD)
• 64 bit block size
• 56 bit key size
AES ( ADVANCED ENCRYPTION STANDARD)
• 128 bit block size.
• 128 bit key size.
DES
Plain Text
64 bit
Key 56 bit
Cipher text
64 bit
T TProcessing
Plain Text
64 bit
Key 56 bit
. . . . .
16 Rounds
Key processor
T
48 bit key
58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4
62 54 46 38 30 22 14 6 64 56 48 40 32 24 16 8
57 49 41 33 25 17 9 1 59 51 43 35 27 19 11 3
61 53 45 37 29 21 13 5 63 55 47 39 31 23 15 7
Left block Right block
Block expansion to 48 bit
AES
128 bit
Plain text
Key 128 bit
Cipher text
128 bit
X
O
R
. . . .
10 rounds
Sub key
ASSYMETRIC CRYPTOGR
APHY
ASYMMETRIC CRPTOGRAPHY
The main issues in Symmetric Cryptography is:-
• Decision by the sender, which key is to be used.
• How to inform the receiver about that key.
• Also a unique key is needed per communicating party which is undesired.
• Also the Problem of key exchange cannot be solved in Symmetric Cryptog
raphy.
ASYMMETRIC CRPTOGRAPHY
• Based on this idea, the first major Asymmetric key cryptography system RSA
Algorithm
• To communicate securely over any network, what is to be done is that, publis
h one’s public key .
• All the public keys can then be stored in a database that anyone can consult.
OVERVIEW OF ASYMMETRIC KEY CRYPTOGRAPHY
• In Asymmetric key cryptography, also called Public Key Cryptography, two di
fferent keys, (which forms a key pair) are used.
• One key is used for encryption and the other corresponding key must be
used for decryption as shown.
ASYMMETRIC CRPTOGRAPHY
• No other key can decrypt the message-not even the original key used for encry
ption.
• In this scheme, every communicating party needs just a key pair for
communicating any number of other communicating parties.
• Once someone obtains a key pair, he/she can communicate with anyone else.
BASIS FOR THE SCHEME
• The basis for this scheme is simple mathematical basis that, if you have extremely
large numbers which have only two factors, which are prime numbers, you can
generate a pair of keys.
• For example 10 has two factors, 5 and 2. So 5 can be used for encryption and 2 for
decryption key.
• 10 is a small numbers, but if this scheme is extended to a very large number, we
can have a large number of unique keys.
• One of the key is called as Public key and the other is called the Private key.
Cryptography
• Important point…
• The RSA Algorithm is as described below:
• The private and public key in RSA are based on very large numbers (made up of
100 or more digits) prime numbers.
• The real challenge in RSA is the selection of the public and private key
Cryptography
Cryptography
Symmetric v/s Assymetric
Crptography
SYMMETRIC
• Same key for Encryption &
Decryption.
• Very Fast
• Encryption text size same as original.
• Key exchange – a big problem.
• No. of keys is equal to square of no.
of participants.
Hence, scalability is an issue.
ASSYMETRIC
• One key for Encryption & other for
Decryption.
• Slower.
• More than original clear text size.
• Not an issue at all.
• No. of keys is equal to number of
participants.
Hence, scales up quite well.
ONE TIME PAD
ONE-TIME PAD
A format of one-time pad used by the U.S. National Security Agency, code named
DIANA. The table on the right is an aid for converting between plaintext and
ciphertext using the characters at left as the key.
In cryptography, the one-time pad (OTP) is an encryption technique that cannot
be cracked if used correctly
example, the technique is to combine the key and the message using modular addition.
The numerical values of corresponding message and key letters are added together,
modulo 26.
So, if key material begins with "XMCKL" and the message is "HELLO", then the coding
would be done as follows:
H E L L O message
7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message
+ 23 (X) 12 (M) 2 (C) 10 (K) 11 (L) key
= 30 16 13 21 25 message + key
= 4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z) message + key (mod 26)
E Q N V Z → ciphertext
QUANTUM KEY DISTRIBUTION
Cryptography
Numbers
Exchanged
Diffie-Hellman Key Exchange
ExchangeKey = (Generator^SecretNumber) mod Prime
FinalKey = (ExchangeKey^SecretNumber) mod Prime
APPLICATIONS
OF
CRYPTOGRAPHY
MOBILE PHONES
 Mobile Phones use cryptography while
sending data from Headset to BTS.
• To avoid eavesdropping, the cipher key
is sent via Optical Fiber.
WHATSAPP
Few months ago, WhatsApp employed
end-to-end encryption mechanism to
ensure its users’ messages security.
TELECOMMUNICATION
SECURE NETWORK COMMUNICATIONS
SECURE SOCKET LAYER (SSL)
 a public-key protocol for providing data security layered between TCP/IP.
 used for establishing an encrypted link between a server and a client.
 SSL allows sensitive information to be transmitted securely.
 SSL secures millions of peoples' data on the Internet every day, especially when
transmitting some confidential information.
HOW TO SPOT A SSL-SECURED WEBSITE
 They have a lock icon being displayed or green
address bar that comes with an extended validation
for SSL-secured website.
 SSL-secured websites also begin with https rather
than http.
CONCLUSION
• These were some the basic cryptography techniques and their
implementation.
• But, with time hackers are sometimes able to crack these too.
• Hence, constant development is being made and new
algorithms are also designed.
• But their basis is the above stated only.
REFERENCES
• https://en.wikipedia.org/wiki/Enigma_machine#Basic_operation
• https://en.wikipedia.org/wiki/File:Enigma_wiring_kleur.svg
• https://en.wikipedia.org/wiki/Hill_cipher
• https://en.wikipedia.org/wiki/Bifid_cipher
• https://en.wikipedia.org/wiki/Playfair_cipher
• https://cryptomath.files.wordpress.com/2008/08/playfair-cipher.ppt
• cc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/2013.spring/projects/Team2.pptx
• www.cs.sjsu.edu/~stamp/crypto/PowerPoint_Windows/2_Enigma.ppt
• www.cs.trincoll.edu/~crypto/student/emilio/EnigmaPoster.ppt
• http://www.garykessler.net/library/crypto.html
• http://www.ijcta.com/
• https://www.scribd.com/doc/27154173/Project-Report-Sample
• https://cyfor.engineering.nyu.edu/wp-content/uploads/2015/08/steg1.png
• http://haktuts.com/What-are-the-types-of-Cryptography/
• https://www.clear.rice.edu/elec301/Projects01/steganosaurus/background.html
Cryptography

More Related Content

Cryptography

  • 2. MEMBERS  TUSHAR SWAMI  TANISH GARG  VIKAS PRASAD  ANURAG AGGARWAL
  • 3. ACKNOWLEDGEMENT We would like to express our special thanks of gratitude to our teacher Dr. Paramjeet who gave us the golden opportunity to present this wonderful presentation on the topic Cryptography, which also helped us in doing a lot of Research and we came to learn new things. We are really thankful to him.
  • 4. OUTLINE 1. INTRODUCTION 2. PROCESSES INVOLVED 3. NEED FOR CRYPTOGRAPHY 4. TYPES 5. SYMMETRIC CRYPTOGRAPHY 6. ASYMMETRIC CRYPTOGRAPHY 7. DIFFERENCES 8. APPLICATIONS 9. CONCLUSION
  • 6. INTRODUCTION Cryptography is an art and science of “Secret Writing”. It achieves security by encoding messages to make them unreadable. This process is systematic and well structured R#5 %>&”m,:p0-S89!@>$ jhnlO0-$557 This a session on Crypt ography and network s ecurity Cryptographic System Unreadable Message Readable Message People illegally try to decode other’s secret information for their benefit. This technique is called cryptanalysis.
  • 7. PROCESSES INVOLVED Encryption Decryption  Encryption - coding information which could either be a file or mail message in into cipher text a form unreadable by anyone.  Decryption - reverse process of converting encoded data to its original un-encoded form, plaintext.
  • 8. Its Cipher text Message is Kl Ekdudw, Krsh brxduhgrlqj ilqh.Krz derxw phhwlqj dw wkh w udlq vwdwlrq wklv Iulgdb dw5 sp?Sohdvh ohwphn qrz li lw lv rn zlwk brx. Uhjdugv. Ylslq Plaintext Message Hi Bharat, Hope you are doing fine. How about meeting at the train station this Friday at 5 pm? Please let me know if it is ok with you. Regards Vipin
  • 10. ISO 27002:2005 defines Information Security as the preservation of: – Confidentiality information is accessible only to those authorized to have access – Integrity Safeguarding the accuracy and complet eness of information and processing methods – Availability authorized users can access information and associated assets whenever required
  • 12. TRADITIONAL CRYPTOGRAPHY Plaintext? 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 Ciphertext? 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 Value? 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Here we assign Numerical Values to each alphabet (lower or upper a to z) as shown. The lower case is used for plaintext and upper case is used for ciphertext.
  • 13. ADDITIVE CIPHER •The Encryption Algorithm adds the key to the plaintext Char. •The Decryption Algorithm subtracts the key from Character. •All operations are done using modulo 26.
  • 14. ADDITIVE CIPHER Problem1: Use the additive cipher with key = 15 to encrypt the message “hello”. We apply the encryption algorithm to the plaintext, character by character as shown: Solution: Plaintext: h ---> 07 Encryption (07+15=22)mod 26 Ciphertext: 22--- > W Plaintext: e ---> 04 Encryption (04+15=19)mod 26 Ciphertext: 19--- > T Plaintext: l ---> 11 Encryption (11+15=26)mod 26 Ciphertext: 00--- > A Plaintext: l ---> 11 Encryption (11+15=26)mod 26 Ciphertext: 00--- > A Plaintext: o ---> 14 Encryption(14+15=29)mod 26 Ciphertext: 03--- > D Therefore, the plaintext “hello” is encrypted to ciphertext “WTAAD”
  • 16. AFFINE CIPHER •Affine Cipher is a combination of Additive and Multiplicative Ciphers with a pair of keys as shown in fig. •The first key k1 is used with the multiplicative cipher and the second key k2 is used with the additive cipher. •The keys are applied one after another.
  • 17. VIGENERE CIPHER • Vigenere cipher was designed by Blaise de Vigenere, It uses a scheme to create the key stream. • The stream is repetition of an initial secret key stream of length, m, where 1≤ m ≥26 • The cipher can be described as below where (k1,k2,k3….km) is the initial secret key agreed to by Alice and Bob. P=P1P2P3……….. C=C1C2CK…………. PK=[(k1,k2………..,km)(k1k2…….km)….] Encryption: Ci=(Pi+ki)mod26 Decryption: Pi=(Ci-ki)mod26
  • 18. VIGENERE CIPHER Problem: Encrypt the plaintext “ She is listening” using the 6 character keyword “ PASCAL”( value = 15,00,18,02, 00,11). Solution: The initial key is PASCAL(Value is 15,00,18,20,00,11). The key stream is the repetition of the initial key stream (as many as can be needed). The Cipher text is fou nd as shown: P=P1P2P3……….. C=C1C2CK…………. PK=[(k1,k2………..,km)(k1k2…….km)….] Encryption: Ci=(Pi+ki)mod26 Decryption: Pi=(Ci-ki)mod26 Plaintext? 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 Ciphertext? 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 Value? 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  • 19. 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 A 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 B 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 A C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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
  • 20. 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 A 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 B 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 A C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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
  • 21. 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 A 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 B 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 A C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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
  • 22. Plaintext: s h e i s l i s t e P’s Values: 18 07 04 08 18 11 08 18 19 04 13 Key Stream: 15 00 18 02 00 11 15 00 18 02 00 C’s Values: 07 07 22 10 18 22 23 18 11 06 13 Ciphertext: H H W K S W X S L G N
  • 23. PROBLEMS WITH TRADITONAL o Very basic techniques. o So easy to crack. o Security level – very low. o Doesn’t support the encryption of special characters o Hence after 1950s, various other cryptography techniques were invented.
  • 24. Hill Cipher • Based on linear algebra. • Each letter is represented by a numbe r modulo 26. • To encrypt a message, each block of n letters is multiplied by an invertible n × n matrix • To decrypt the message, each block is multiplied by the inverse of the matrix used for encryption. • Vulnerable to a known-plaintext attack Consider the message 'ACT’, The key (GYBNQKURP ): Thus the enciphered vector is given by: which corresponds to a ciphertext of 'POH’.
  • 25. Bifid Cipher  Combines the Polybius s quare with transposition, and uses fractionation to achieve diffusion.  First, a mixed alphabet Polybius square is drawn up 1 2 3 4 5 1 B G W K Z 2 Q P N D S 3 I O A X E 4 F C L U M 5 T H Y V R  The message is converted to its coordinates F L E E A T O N C E 4 4 3 3 3 5 3 2 4 3 1 3 5 5 3 1 2 3 2 5  They are then read out in rows: 4 4 3 3 3 5 3 2 4 3 1 3 5 5 3 1 2 3 2 5  Then divided up into pairs again4 4 3 3 3 5 3 2 4 3 1 3 5 5 3 1 2 3 2 5 U A E O L W R I N S
  • 26. Playfair Cipher • Preparing the Key: Alphabet Square – present with an alphabet squar e – 5*5 – No repeat letter – No Js  Encrypts pairs of letters (bigrams or digrams), i nstead of single letters  More complex system  Rules:  letters appear on the same row: replace them with the letters to their immediate right  letters appear on the same column: replace th em with the letters immediately below  not on the same row or column:replace them with the letters on the same row but at the ot her pair of corners of the rectangle defined by the original pair.
  • 27. Playfair cipher Example: • Using "playfair example" as the key, the table becomes (omitted letters in red): • Encrypting the message "Hide the gold in the tree stump" (note the null "X" used to separate the repeated "E"s). • HI DE TH EG OL DI NT HE TR EX ES TU MP
  • 28.  Thus the message "Hide the gold in the tree stump" becomes "BMODZ BXDNA BEKUD MUIXM M OUVI F". (Breaks included for ease of reading the cipher text.) Playfair cipher Example(cont.): Decipher :  Shift up and left instead of down and right  Drop extra X  Locate any missing any “I”s that should be “J”s  Back into the original readable message
  • 29. Enigma Machine • Enigma is actually a brand of cipher machi nes, not a single machine • Most were created before and during WWll • They were used to send encrypted messag es among Hitler’s army • Has three rotating rotors, a plugboard and a reflector. • Combination of mechanical and electrical subsystems. • The mechanical subsystem consists of a ke yboard; a set of rotating disks called rotors arranged adjacently along a spindle; and o ne of various stepping components to turn at least one rotor with each key press.
  • 30. How It Works? • It is a combination of three rotating rotor (wheel). • The inner rotor rotate one step after every single c haracter is encrypted. • The middle rotor rotate one step after the inner rot or complete a round of rotation. • Same for the outer rotor. • The plugboard provides a customiz able swapping of pairs letters both before and after a character pas sed through the rotors.
  • 31. Electrical pathway • When a key is pressed, one or more ro tors move to form a new rotor configur ation, and a circuit is completed. • When encrypting a message starting A NX..., the operator would first press th e A key, and the D lamp might light, s o D would be the first letter of the cip hertext. • Current flowed from the battery (1) -> bi-directional keyboard switch (2) to th e plugboard (3). Next, it passed throug h the plug "A" (3) via the entry wheel ( 4) -> installed rotors (5), and entered t he reflector (6). • The reflector returned the current, via a n entirely different path proceeding thr ough plug "S" (7) connected with a cab le (8) to plug "D"
  • 33. SYMMETRIC KEY CRYPTOGRAPHY Where the key for both sender and receiver is same. There are two types of Symmetric key cryptography: 1) STREAM CIPHER Encrypts data character by character. 2) BLOCK CIPHER Encrypts data block by block.
  • 34. STREAM CIPHERS Uses a fixed length key to produce a pseudo-random stream of bits in the form of ones and zeroes. Same key gives same stream of ones and zeroes. XOR (exclusive OR) of key with plain text gives encryption. XOR of the key with the cipher text will give decryption.
  • 35. Some real world stream cipher systems are : 1)RC4 Used in WEP wireless network security. One option in TLS/HTTPS for encrypting web traffic. STREAM CIPHERS 2)A5/1 Used in encrypting GSM phone data an d conversation.
  • 38. Example:- For encryption o Plain text : 0110 o Key stream : 1100 o Cipher text : 1010 For decryption o Cipher text : 1010 o Key stream : 1100 o Plain text : 0110
  • 39. BLOCK CIPHERS Type of symmetric key encryption. Uses a fixed length to encrypt a fixed block of data. Real world Block ciphers DES (DATA ENCRYPTION STANDARD) • 64 bit block size • 56 bit key size AES ( ADVANCED ENCRYPTION STANDARD) • 128 bit block size. • 128 bit key size.
  • 40. DES Plain Text 64 bit Key 56 bit Cipher text 64 bit T TProcessing
  • 41. Plain Text 64 bit Key 56 bit . . . . . 16 Rounds Key processor T 48 bit key
  • 42. 58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4 62 54 46 38 30 22 14 6 64 56 48 40 32 24 16 8 57 49 41 33 25 17 9 1 59 51 43 35 27 19 11 3 61 53 45 37 29 21 13 5 63 55 47 39 31 23 15 7 Left block Right block
  • 44. AES 128 bit Plain text Key 128 bit Cipher text 128 bit X O R . . . . 10 rounds Sub key
  • 46. ASYMMETRIC CRPTOGRAPHY The main issues in Symmetric Cryptography is:- • Decision by the sender, which key is to be used. • How to inform the receiver about that key. • Also a unique key is needed per communicating party which is undesired. • Also the Problem of key exchange cannot be solved in Symmetric Cryptog raphy.
  • 47. ASYMMETRIC CRPTOGRAPHY • Based on this idea, the first major Asymmetric key cryptography system RSA Algorithm • To communicate securely over any network, what is to be done is that, publis h one’s public key . • All the public keys can then be stored in a database that anyone can consult.
  • 48. OVERVIEW OF ASYMMETRIC KEY CRYPTOGRAPHY • In Asymmetric key cryptography, also called Public Key Cryptography, two di fferent keys, (which forms a key pair) are used. • One key is used for encryption and the other corresponding key must be used for decryption as shown.
  • 49. ASYMMETRIC CRPTOGRAPHY • No other key can decrypt the message-not even the original key used for encry ption. • In this scheme, every communicating party needs just a key pair for communicating any number of other communicating parties. • Once someone obtains a key pair, he/she can communicate with anyone else.
  • 50. BASIS FOR THE SCHEME • The basis for this scheme is simple mathematical basis that, if you have extremely large numbers which have only two factors, which are prime numbers, you can generate a pair of keys. • For example 10 has two factors, 5 and 2. So 5 can be used for encryption and 2 for decryption key. • 10 is a small numbers, but if this scheme is extended to a very large number, we can have a large number of unique keys. • One of the key is called as Public key and the other is called the Private key.
  • 52. • Important point… • The RSA Algorithm is as described below: • The private and public key in RSA are based on very large numbers (made up of 100 or more digits) prime numbers. • The real challenge in RSA is the selection of the public and private key
  • 56. SYMMETRIC • Same key for Encryption & Decryption. • Very Fast • Encryption text size same as original. • Key exchange – a big problem. • No. of keys is equal to square of no. of participants. Hence, scalability is an issue. ASSYMETRIC • One key for Encryption & other for Decryption. • Slower. • More than original clear text size. • Not an issue at all. • No. of keys is equal to number of participants. Hence, scales up quite well.
  • 58. ONE-TIME PAD A format of one-time pad used by the U.S. National Security Agency, code named DIANA. The table on the right is an aid for converting between plaintext and ciphertext using the characters at left as the key. In cryptography, the one-time pad (OTP) is an encryption technique that cannot be cracked if used correctly
  • 59. example, the technique is to combine the key and the message using modular addition. The numerical values of corresponding message and key letters are added together, modulo 26. So, if key material begins with "XMCKL" and the message is "HELLO", then the coding would be done as follows: H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11 (L) key = 30 16 13 21 25 message + key = 4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z) message + key (mod 26) E Q N V Z → ciphertext
  • 62. Numbers Exchanged Diffie-Hellman Key Exchange ExchangeKey = (Generator^SecretNumber) mod Prime FinalKey = (ExchangeKey^SecretNumber) mod Prime
  • 64. MOBILE PHONES  Mobile Phones use cryptography while sending data from Headset to BTS. • To avoid eavesdropping, the cipher key is sent via Optical Fiber. WHATSAPP Few months ago, WhatsApp employed end-to-end encryption mechanism to ensure its users’ messages security. TELECOMMUNICATION
  • 65. SECURE NETWORK COMMUNICATIONS SECURE SOCKET LAYER (SSL)  a public-key protocol for providing data security layered between TCP/IP.  used for establishing an encrypted link between a server and a client.  SSL allows sensitive information to be transmitted securely.  SSL secures millions of peoples' data on the Internet every day, especially when transmitting some confidential information. HOW TO SPOT A SSL-SECURED WEBSITE  They have a lock icon being displayed or green address bar that comes with an extended validation for SSL-secured website.  SSL-secured websites also begin with https rather than http.
  • 66. CONCLUSION • These were some the basic cryptography techniques and their implementation. • But, with time hackers are sometimes able to crack these too. • Hence, constant development is being made and new algorithms are also designed. • But their basis is the above stated only.
  • 67. REFERENCES • https://en.wikipedia.org/wiki/Enigma_machine#Basic_operation • https://en.wikipedia.org/wiki/File:Enigma_wiring_kleur.svg • https://en.wikipedia.org/wiki/Hill_cipher • https://en.wikipedia.org/wiki/Bifid_cipher • https://en.wikipedia.org/wiki/Playfair_cipher • https://cryptomath.files.wordpress.com/2008/08/playfair-cipher.ppt • cc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/2013.spring/projects/Team2.pptx • www.cs.sjsu.edu/~stamp/crypto/PowerPoint_Windows/2_Enigma.ppt • www.cs.trincoll.edu/~crypto/student/emilio/EnigmaPoster.ppt • http://www.garykessler.net/library/crypto.html • http://www.ijcta.com/ • https://www.scribd.com/doc/27154173/Project-Report-Sample • https://cyfor.engineering.nyu.edu/wp-content/uploads/2015/08/steg1.png • http://haktuts.com/What-are-the-types-of-Cryptography/ • https://www.clear.rice.edu/elec301/Projects01/steganosaurus/background.html