SlideShare a Scribd company logo
Basic Encryption and Decryption
• Encryption: a process of encoding a message
so that its meaning is not obvious
• Decryption: the reverse process
Encode(encipher) vs.
Decode(decipher)
• Encoding: the process of translating entire
words or phrases to other words or phrases
• Enciphering: translating letters or symbols
individually
• Encryption: the group term that covers both
encoding and enciphering
Basic operations
• plaintext to ciphertext: encryption
C = E(P)
• ciphertext to plaintext: decryption:
P = D(C)
requirement: P = D(E(P))
Classical Encryption
Techniques
• Symmetric key encryption
• Asymmetric key encryption
Symmetric Key Encryption
• Sender and recipient share a common key
• Was the only type of cryptography, prior to
invention of public-key in 1970’s
• All traditional schemes are symmetric / single
key / private-key encryption algorithms, with
a single key, used for both encryption and
decryption, since both sender and receiver are
equivalent, either can encrypt or decrypt
messages using that common key.
Symmetric Cipher Model
Requirements
• Two requirements for secure use of symmetric
encryption:
– a strong encryption algorithm
– a secret key known only to sender / receiver
Y = EK(X)
X = DK(Y)
Here, plaintext X, ciphertext Y, key K, encryption
algorithm Ek, decryption algorithm Dk.
• Assume encryption algorithm is known
• Implies a secure channel to distribute key
Types of Ciphers
• Substitution ciphers
• Permutation (or transposition) ciphers
Classical Substitution Ciphers
• A substitution cipher replaces one
symbol with another.
• Substitution ciphers can be categorized
as either monoalphabetic ciphers or
polyalphabetic ciphers.
Monoalphabetic Ciphers
• In monoalphabetic substitution, the
relationship between a symbol in the
plaintext to a symbol in the ciphertext is
always one-to-one.
• The simplest monoalphabetic cipher is
the additive cipher. This cipher is
sometimes called a shift cipher and
sometimes a Caesar cipher
Caesar Cipher
• Earliest known substitution cipher
• First attested use in military affairs
• Replaces each letter by 3rd letter on
• example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
• Note: when letters are involved, the following
conventions are used in this course: Plaintext
is always in lowercase; ciphertext is in
uppercase
• can define transformation as:
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
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
• mathematically give each letter a number
• then have Caesar cipher as:
C = E(p) = (p + k) mod (26)
p = D(C) = (C – k) mod (26)
When the cipher is additive, the plaintext, ciphertext, and key are integers
in Z26
• This mathematical description uses modulo
arithmetic (ie clock arithmetic). Here, when
you reach Z you go back to A and start again.
Mod 26 implies that when you reach 26, you
use 0 instead (ie the letter after Z, or 25 + 1
goes to A or 0).
• Example: howdy (7,14,22,3,24) encrypted
using key f (5) is MTBID
Example
• Use the additive cipher with key = 15 to
encrypt the message “hello”.
• Use the additive cipher with key = 15 to
decrypt the message “WTAAD”.
Cryptanalysis of Caesar Cipher
• only have 26 possible keys, of which only 25
are of any use, since mapping A to A etc
doesn't really obscure the message.
• Advantage : easy to use
• Disadvantage: simple structure and easy to
break
Polyalphabetic Ciphers
• another approach to improving security is to
use multiple cipher alphabets
• called polyalphabetic substitution ciphers
• makes cryptanalysis harder with more
alphabets to guess and flatter frequency
distribution
• use a key to select which alphabet is used for
each letter of the message
Vigenere Cipher
• Vigenere key stream does not depend
on the plaintext characters; it depends
only on the position of the character in
the plaintext
Example
• encrypt the message She is listening using the
6-character keyword “PASCAL”.
• The initial key stream is (15, 0, 18, 2, 0, 11).
The key stream is the repetition of this initial
key stream (as many times as needed
TRANSPOSITION CIPHERS
TRANSPOSITION CIPHERS
• A transposition cipher does not
substitute one symbol for another,
instead it changes the location of the
symbols.
Keyless Transposition Ciphers
• Simple transposition ciphers, which were
used in the past, are keyless.
• Text is written into a table column by
column and then is transmitted row by
row.
• Text is written into a table and row by row,
then is transmitted column by column.
Example: Rail fence cipher.
• The ciphertext is created reading the
pattern row by row.
• For example, to send the message “Meet
me at the park” to Bob, Alice writes
She then creates the ciphertext
“MEMATEAKETETHPR
Example
• Alice and Bob can agree on the number
of columns and use the second method.
Alice writes the same plaintext, row by
row, in a table of four columns.
She then creates the ciphertext
“MMTAEEHREAEKTTP”.
Keyed Transposition Ciphers
• Divide the plaintext into groups of
predetermined size, called blocks, and
then use a key to permute the characters
in each block separately.
Steganography
• an alternative to encryption
• hides existence of message
– using only a subset of letters/words in a longer
message marked in some way
– using invisible ink
– hiding in LSB in graphic image or sound file
• has drawbacks
– high overhead to hide relatively few info bits
CONVENTIONAL ENCRYPTION
ALGORITHMS
CONVENTIONAL ENCRYPTION ALGORITHMS
• Triple DES
• International Data Encryption Algorithm (IDEA)
• Blowfish
• RC5
• CAST-128
• RC2
• Characteristics of Advanced Symmetric Block
Ciphers

More Related Content

What's hot

Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
Information Security Awareness Group
 
CS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network SecurityCS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network Security
vishnukp34
 
Information Security & Cryptography
Information Security & CryptographyInformation Security & Cryptography
Information Security & Cryptography
Arun ACE
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
Cryptography ppt
Cryptography pptCryptography ppt
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
2. Stream Ciphers
2. Stream Ciphers2. Stream Ciphers
2. Stream Ciphers
Sam Bowne
 
PGP S/MIME
PGP S/MIMEPGP S/MIME
PGP S/MIME
Sou Jana
 
Basic cryptography
Basic cryptographyBasic cryptography
Basic cryptography
Perfect Training Center
 
Network security & cryptography full notes
Network security & cryptography full notesNetwork security & cryptography full notes
Network security & cryptography full notes
gangadhar9989166446
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
Hossain Md Shakhawat
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
Sathish Kumar
 
Cryptography
CryptographyCryptography
Cryptography
Jens Patel
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
zahid-mian
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
Md. Afif Al Mamun
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
Unit 1
Unit 1Unit 1
Security Mechanisms
Security MechanismsSecurity Mechanisms
Security Mechanismspriya_trehan
 
Digital signature(Cryptography)
Digital signature(Cryptography)Digital signature(Cryptography)
Digital signature(Cryptography)
Soham Kansodaria
 

What's hot (20)

Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 
CS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network SecurityCS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network Security
 
Information Security & Cryptography
Information Security & CryptographyInformation Security & Cryptography
Information Security & Cryptography
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
 
2. Stream Ciphers
2. Stream Ciphers2. Stream Ciphers
2. Stream Ciphers
 
PGP S/MIME
PGP S/MIMEPGP S/MIME
PGP S/MIME
 
Basic cryptography
Basic cryptographyBasic cryptography
Basic cryptography
 
Network security & cryptography full notes
Network security & cryptography full notesNetwork security & cryptography full notes
Network security & cryptography full notes
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Cryptography
CryptographyCryptography
Cryptography
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
Unit 1
Unit 1Unit 1
Unit 1
 
Security Mechanisms
Security MechanismsSecurity Mechanisms
Security Mechanisms
 
Digital signature(Cryptography)
Digital signature(Cryptography)Digital signature(Cryptography)
Digital signature(Cryptography)
 

Similar to basic encryption and decryption

Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Dr.Florence Dayana
 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptography
G Prachi
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
nagwaAboElenein
 
Week 5 lec 5 Cryptography.pptx
Week 5 lec 5 Cryptography.pptxWeek 5 lec 5 Cryptography.pptx
Week 5 lec 5 Cryptography.pptx
MuhammadAbdullah201796
 
UNIT 2.ppt
UNIT 2.pptUNIT 2.ppt
UNIT 2.ppt
Manoj R. Kharde
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
ssuser4198c4
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques
Dr. Kapil Gupta
 
Classical Encryption Techniques.pdf
Classical Encryption Techniques.pdfClassical Encryption Techniques.pdf
Classical Encryption Techniques.pdf
DevangShukla10
 
cryptography.ppt
cryptography.pptcryptography.ppt
cryptography.ppt
AkshayaPriyaJanartha
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
saqib1611
 
Information security powerpoint presentation
Information security powerpoint presentationInformation security powerpoint presentation
Information security powerpoint presentation
MuneebZahid10
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Mona Rajput
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher System
Asad Ali
 
Classical Encryption
Classical EncryptionClassical Encryption
Classical Encryption
Shafaan Khaliq Bhatti
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
Shubham Jain
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
Ghamdan5
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
akamkhalidmohammed
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
RaghavRathi40
 

Similar to basic encryption and decryption (20)

Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptography
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
 
Week 5 lec 5 Cryptography.pptx
Week 5 lec 5 Cryptography.pptxWeek 5 lec 5 Cryptography.pptx
Week 5 lec 5 Cryptography.pptx
 
UNIT 2.ppt
UNIT 2.pptUNIT 2.ppt
UNIT 2.ppt
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques
 
Classical Encryption Techniques.pdf
Classical Encryption Techniques.pdfClassical Encryption Techniques.pdf
Classical Encryption Techniques.pdf
 
cryptography.ppt
cryptography.pptcryptography.ppt
cryptography.ppt
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
 
Ch02
Ch02Ch02
Ch02
 
Information security powerpoint presentation
Information security powerpoint presentationInformation security powerpoint presentation
Information security powerpoint presentation
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
 
Unit – III.pptx
Unit – III.pptxUnit – III.pptx
Unit – III.pptx
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher System
 
Classical Encryption
Classical EncryptionClassical Encryption
Classical Encryption
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 

Recently uploaded

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 

Recently uploaded (20)

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 

basic encryption and decryption

  • 1. Basic Encryption and Decryption
  • 2. • Encryption: a process of encoding a message so that its meaning is not obvious • Decryption: the reverse process
  • 3. Encode(encipher) vs. Decode(decipher) • Encoding: the process of translating entire words or phrases to other words or phrases • Enciphering: translating letters or symbols individually • Encryption: the group term that covers both encoding and enciphering
  • 4. Basic operations • plaintext to ciphertext: encryption C = E(P) • ciphertext to plaintext: decryption: P = D(C) requirement: P = D(E(P))
  • 5. Classical Encryption Techniques • Symmetric key encryption • Asymmetric key encryption
  • 6. Symmetric Key Encryption • Sender and recipient share a common key • Was the only type of cryptography, prior to invention of public-key in 1970’s • All traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key, used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
  • 8. Requirements • Two requirements for secure use of symmetric encryption: – a strong encryption algorithm – a secret key known only to sender / receiver Y = EK(X) X = DK(Y) Here, plaintext X, ciphertext Y, key K, encryption algorithm Ek, decryption algorithm Dk. • Assume encryption algorithm is known • Implies a secure channel to distribute key
  • 9. Types of Ciphers • Substitution ciphers • Permutation (or transposition) ciphers
  • 10. Classical Substitution Ciphers • A substitution cipher replaces one symbol with another. • Substitution ciphers can be categorized as either monoalphabetic ciphers or polyalphabetic ciphers.
  • 11. Monoalphabetic Ciphers • In monoalphabetic substitution, the relationship between a symbol in the plaintext to a symbol in the ciphertext is always one-to-one.
  • 12. • The simplest monoalphabetic cipher is the additive cipher. This cipher is sometimes called a shift cipher and sometimes a Caesar cipher
  • 13. Caesar Cipher • Earliest known substitution cipher • First attested use in military affairs • Replaces each letter by 3rd letter on • example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB
  • 14. • Note: when letters are involved, the following conventions are used in this course: Plaintext is always in lowercase; ciphertext is in uppercase
  • 15. • can define transformation as: 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 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 • mathematically give each letter a number • then have Caesar cipher as: C = E(p) = (p + k) mod (26) p = D(C) = (C – k) mod (26)
  • 16. When the cipher is additive, the plaintext, ciphertext, and key are integers in Z26
  • 17. • This mathematical description uses modulo arithmetic (ie clock arithmetic). Here, when you reach Z you go back to A and start again. Mod 26 implies that when you reach 26, you use 0 instead (ie the letter after Z, or 25 + 1 goes to A or 0). • Example: howdy (7,14,22,3,24) encrypted using key f (5) is MTBID
  • 18. Example • Use the additive cipher with key = 15 to encrypt the message “hello”.
  • 19. • Use the additive cipher with key = 15 to decrypt the message “WTAAD”.
  • 20. Cryptanalysis of Caesar Cipher • only have 26 possible keys, of which only 25 are of any use, since mapping A to A etc doesn't really obscure the message. • Advantage : easy to use • Disadvantage: simple structure and easy to break
  • 21. Polyalphabetic Ciphers • another approach to improving security is to use multiple cipher alphabets • called polyalphabetic substitution ciphers • makes cryptanalysis harder with more alphabets to guess and flatter frequency distribution • use a key to select which alphabet is used for each letter of the message
  • 22. Vigenere Cipher • Vigenere key stream does not depend on the plaintext characters; it depends only on the position of the character in the plaintext
  • 23.
  • 24. Example • encrypt the message She is listening using the 6-character keyword “PASCAL”. • The initial key stream is (15, 0, 18, 2, 0, 11). The key stream is the repetition of this initial key stream (as many times as needed
  • 26. TRANSPOSITION CIPHERS • A transposition cipher does not substitute one symbol for another, instead it changes the location of the symbols.
  • 27. Keyless Transposition Ciphers • Simple transposition ciphers, which were used in the past, are keyless. • Text is written into a table column by column and then is transmitted row by row. • Text is written into a table and row by row, then is transmitted column by column.
  • 28. Example: Rail fence cipher. • The ciphertext is created reading the pattern row by row. • For example, to send the message “Meet me at the park” to Bob, Alice writes She then creates the ciphertext “MEMATEAKETETHPR
  • 29. Example • Alice and Bob can agree on the number of columns and use the second method. Alice writes the same plaintext, row by row, in a table of four columns. She then creates the ciphertext “MMTAEEHREAEKTTP”.
  • 30. Keyed Transposition Ciphers • Divide the plaintext into groups of predetermined size, called blocks, and then use a key to permute the characters in each block separately.
  • 31. Steganography • an alternative to encryption • hides existence of message – using only a subset of letters/words in a longer message marked in some way – using invisible ink – hiding in LSB in graphic image or sound file • has drawbacks – high overhead to hide relatively few info bits
  • 33. CONVENTIONAL ENCRYPTION ALGORITHMS • Triple DES • International Data Encryption Algorithm (IDEA) • Blowfish • RC5 • CAST-128 • RC2 • Characteristics of Advanced Symmetric Block Ciphers