0% found this document useful (0 votes)
66 views2 pages

Caesar Cipher

The document explains the Caesar cipher, a simple substitution cipher where each letter in the plaintext is shifted three places forward in the alphabet for encryption. It provides the encryption formula C = (p + k) mod 26 and the decryption formula p = (C - k) mod 26, demonstrating the process with an example. The final decrypted message from the given ciphertext 'DOOV ZHOO WKDW HQGV ZHOO' is 'ALL'S WELL THAT ENDS WELL'.

Uploaded by

sravyasri2806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views2 pages

Caesar Cipher

The document explains the Caesar cipher, a simple substitution cipher where each letter in the plaintext is shifted three places forward in the alphabet for encryption. It provides the encryption formula C = (p + k) mod 26 and the decryption formula p = (C - k) mod 26, demonstrating the process with an example. The final decrypted message from the given ciphertext 'DOOV ZHOO WKDW HQGV ZHOO' is 'ALL'S WELL THAT ENDS WELL'.

Uploaded by

sravyasri2806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

4.

) Explain simple substitution cipher algorithm techniques


A plaintext was encrypted with a Caesar cipher, resulting in the following:
DOOV ZHOO WKDW HQGV ZHOO Can you work out what the
plaintext was?
A.) CAESAR CIPHER
 Caesar Cipher − In this substitution technique, it can encrypt the plain
text, each alphabet of the plain text is restored by the alphabet three
places further it and it can decrypt the cipher text each alphabet of cipher
text is restored by the alphabet three places before it.
 The cipher technique, that uses the key value as 3 is said to be the Caesar
cipher method. Every letter is replaced by the fixed value (3 in case of Caesar
cipher).

A B C D E F G H I J K L M
1 2 3 4 5 6 7 8 9 10 11 12 13
N O P Q R S T U V W X Y Z
14 15 16 17 18 19 20 21 22 23 24 25 26

The encryption formula is:


C = (p + k) mod 26
where:
- C = ciphertext letter
- p = plaintext letter
- k = shift value (e.g., 3)
Ex: for letter A (1)
C= (1+3) mod 26
=4 mod 26
=4 (D).
Decryption reverses the shift using:
p = (C - k) mod 26
where, c=letter position number
k=shift value(3 for Caesar cipher)
Ex: For D ,
p= (4-3) mod 26
=1 (A).
similarly we do shift all the letters by using the decryption formula
Given Ciphertext
The encrypted message is: "DOOV ZHOO WKDW HQGV ZHOO"
We assume a shift of 3 (as commonly used in the Caesar cipher).
Step 1: Reverse the Shift (Decrypting Each Letter)
Ciphertext Alphabet Shift Back (-3) Plaintext
Position
D 4 1 (A) A
O 15 12 (L) L
O 15 12 (L) L
V 22 19 (S) S
(space) - - (space)
Z 26 23 (W) W
H 8 5 (E) E
O 15 12 (L) L
O 15 12 (L) L
(space) - - (space)
W 23 20 (T) T
K 11 8 (H) H
D 4 1 (A) A
W 23 20 (T) T
(space) - - (space)
H 8 5 (E) E
Q 17 14 (N) N
G 7 4 (D) D
V 22 19 (S) S
(space) - - (space)
Z 26 23 (W) W
H 8 5 (E) E
O 15 12 (L) L
O 15 12 (L) L
Step 2: Final Decrypted Message
After decrypting all letters, we obtain: "ALL'S WELL THAT ENDS WELL"

You might also like