Caesar Cipher
 Presented By:
1. Ali (2020-SE-33)
2. Hashar Ahmed (2020-SE-12)
Terms:
 Plaintext
 Is a message to be communicated.
 Ciphertext
 A disguised version of a plaintext.
 Encryption
 The process of turning Plaintext into Ciphertext.
 Decryption
 The process of turning Ciphertext into Plaintext.
Caesar Cipher
 One of the earliest known examples of substitution cipher.
 Said to have been used by Julius Caesar to communicate with his army (secretly).
 Each character of a plaintext message is replaced by a character n position down in the alphabet.
 Belongs to Substitution Cipher.
Caesar Cipher
Example:
 The first row denotes the plaintext
 Second row denotes the ciphertext
 The ciphertext is obtained by "shifting" the original letter by the N position to the right.
 In this example, it is shifted by 3 to the right.
 A becomes D
 B becomes E
 X becomes A, and so on...
A B C D E … … X Y Z
D E F G H … … A B C
Caesar Cipher
 Suppose the following plaintext is to be encrypted:
ATTACK AT DAWN
 By shifting each letter by 3, to the right. Then the resulting ciphertext would be:
DWWDFN DW GDZQ
A B C D E … … X Y Z
D E F G H … … A B C
Caesar Cipher
 One could shift other than 3 letters apart.
 The offset (Number of shifts) is called the "Key"
Decryption Process:
 Given that the key is known, just shift back N letter to the left.
Example:
 Ciphertext: WJYZWS YT GFXJ
 Key used: 5
 Plaintext: RETURN TO BASE
Caesar Cipher
Math Behind Encryption:
 This can be represented using modular arithmetic.
 Assume that : A = 0, B = 1, C = 2, ..., Y = 24, Z = 25.
 Encryption process can be represented as:
 Such that: e(x) = (x + k) (mod 26)
 X → the plaintext.
 K → the number of shifts (offset).
 26 → There are 26 letters in the alphabet (English alphabet).
Caesar Cipher
Math Behind Decryption:
 Can be represented using modular arithmetic.
 Assume that : A = 0, B = 1, C = 2, ..., Y = 24, Z = 25.
 The decryption process can be represented as:
 Such that: e(x) = (x - k) (mod 26).
 X → the plaintext.
 k → the key (number of shifts or offset).
 26 → There are 26 letters in the alphabet (English alphabet).
Example
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
0 1 2 3 4 5 6 7 8 9 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
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
 Then have Caesar cipher as:
 c = E(p) = (p + k) mod (26)  12%26  12 = M
 p = D(c) = (c – k) mod (26)  7%26  7 = H
 Example: HOWDY (7,14,22,3,24) encrypted using key k (i.e a shift of 5) is MTBID
Can Define Transformation as:
Mathematically Give Each Letter a number :
Thank You

Caesar Cipher.pptx Information Security ppt

  • 1.
    Caesar Cipher  PresentedBy: 1. Ali (2020-SE-33) 2. Hashar Ahmed (2020-SE-12)
  • 2.
    Terms:  Plaintext  Isa message to be communicated.  Ciphertext  A disguised version of a plaintext.  Encryption  The process of turning Plaintext into Ciphertext.  Decryption  The process of turning Ciphertext into Plaintext.
  • 3.
    Caesar Cipher  Oneof the earliest known examples of substitution cipher.  Said to have been used by Julius Caesar to communicate with his army (secretly).  Each character of a plaintext message is replaced by a character n position down in the alphabet.  Belongs to Substitution Cipher.
  • 4.
    Caesar Cipher Example:  Thefirst row denotes the plaintext  Second row denotes the ciphertext  The ciphertext is obtained by "shifting" the original letter by the N position to the right.  In this example, it is shifted by 3 to the right.  A becomes D  B becomes E  X becomes A, and so on... A B C D E … … X Y Z D E F G H … … A B C
  • 5.
    Caesar Cipher  Supposethe following plaintext is to be encrypted: ATTACK AT DAWN  By shifting each letter by 3, to the right. Then the resulting ciphertext would be: DWWDFN DW GDZQ A B C D E … … X Y Z D E F G H … … A B C
  • 6.
    Caesar Cipher  Onecould shift other than 3 letters apart.  The offset (Number of shifts) is called the "Key" Decryption Process:  Given that the key is known, just shift back N letter to the left. Example:  Ciphertext: WJYZWS YT GFXJ  Key used: 5  Plaintext: RETURN TO BASE
  • 7.
    Caesar Cipher Math BehindEncryption:  This can be represented using modular arithmetic.  Assume that : A = 0, B = 1, C = 2, ..., Y = 24, Z = 25.  Encryption process can be represented as:  Such that: e(x) = (x + k) (mod 26)  X → the plaintext.  K → the number of shifts (offset).  26 → There are 26 letters in the alphabet (English alphabet).
  • 8.
    Caesar Cipher Math BehindDecryption:  Can be represented using modular arithmetic.  Assume that : A = 0, B = 1, C = 2, ..., Y = 24, Z = 25.  The decryption process can be represented as:  Such that: e(x) = (x - k) (mod 26).  X → the plaintext.  k → the key (number of shifts or offset).  26 → There are 26 letters in the alphabet (English alphabet).
  • 9.
    Example A B CD E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 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 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  Then have Caesar cipher as:  c = E(p) = (p + k) mod (26)  12%26  12 = M  p = D(c) = (c – k) mod (26)  7%26  7 = H  Example: HOWDY (7,14,22,3,24) encrypted using key k (i.e a shift of 5) is MTBID Can Define Transformation as: Mathematically Give Each Letter a number :
  • 10.