Professional Documents
Culture Documents
Week 15 Cryptography
Week 15 Cryptography
Week 15 Cryptography
Methods of Cryptography:
1.) Shift Cipher (Ceasar Cipher)
2.) Using a Modulo Operator
ABCDEFGHIJKLMNOPQRSTUVWXYZ
This means that after shifting C thrice to the right, its equivalent is F.
Step 3: Form the encrypted message. CRYPTOGRAPHY – FUBSWRJUDSKB
CRYPTOGRAPHY
Example 2: Decrypt to cipher text, “BJY DN BJJY”, using the key of 5
shifts to the left.
Solutions:
Step 1: Write the letters of the English alphabet.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Step 2: Make 5 shifts from the given letter going to the right (opposite of
the given direction when the process involved is decryption).
ABCDEFGHIJKLMNOPQRSTUVWXYZ
This means that after shifting B five times to the right (opposite direction, its equivalent is G.
Step 3: Form“BJY
the encrypted
DN BJJY”message.
– “GOD IS GOOD”
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
CRYPTOGRAPHY
USING MODULO OPERATOR – the sender of the message uses the
key K to encrypt and to decrypt the secret message. The key K
may have any integer value from 0 to 25 and this will be shared to
the person/s who will be receiving the secret message.
Step 2: M M W I S F U N T O L E A R N
12 12 22 8 18 5 20 13 19 14 11 4 0 17 13 C
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 +K
17 17 27 13 23 10 25 18 24 19 16 9 5 22 18 C+K
Step 3: Since 27 exceeded 25, apply modulo operator to find its equivalent.
That will be Y = 27mod26 which is equal to 1. Converting every Y into a
letter in the english alphabet we have RRB NX KZS YT QJFWS.
CRYPTOGRAPHY
Example 2: Decrypt the message “RRB NX KZS YT QJFWS”. Let k = 5.
Here’s the solution:
Step 1: ABCDEFGHIJKLMNOPQRSTUVWXYZ
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
Step 2: R R B N X K Z S Y T Q J F W S
17 17 1 13 23 10 25 18 24 19 16 9 5 22 18 Y
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 – K
12 12 - 4 8 18 5 20 13 19 14 11 4 0 17 13 Y–K