You are on page 1of 42


LEARNING OUTCOME
Perform clock arithmetic, computing
day of the week, determining Check
Digit of UPC, credit cards numbers
and bar codes using the concept of
congruences. / cryptography.
𝑎 − 𝑏 13 − 1 12
1) 13 ≡ 1 𝑚𝑜𝑑 6 = = = 2 (𝑖𝑛𝑡𝑒𝑔𝑒𝑟)
𝑛 6 6

𝑎 − 𝑏 84 − 4 80
2) 84 ≡ 4 𝑚𝑜𝑑 10 = = = 8 (𝑖𝑛𝑡𝑒𝑔𝑒𝑟)
𝑛 10 10

3) 60 ≡ 0 𝑚𝑜𝑑 5 𝑎 − 𝑏 60 − 0 60
= = = 12 (𝑖𝑛𝑡𝑒𝑔𝑒𝑟)
𝑛 5 5
𝑑13 = 10 − 9 + 3 7 + 8 + 3 0 + 7 + 3 4 + 3 + 3 2 + 5 + 3 8 + 2 + 3 0 𝑚𝑜𝑑10

𝑑13 = 10 − (9 + 21 + 8 + 0 + 7 + 12 + 3 + 6 + 5 + 24 + 2 + 0)𝑚𝑜𝑑10
𝑑13 = 10 − 97𝑚𝑜𝑑10
𝑑13 = 10 − 7 978 − 0 − 7432 − 5820
𝑑13 = 3
𝑑13 = 10 − 9 + 3 7 + 8 + 3 0 + 7 + 3 6 + 0 + 3 7 + 3 + 3 2 + 6 + 3 1 𝑚𝑜𝑑10
𝑑13 = 10 − (9 + 21 + 8 + 0 + 7 + 18 + 0 + 21 + 3 + 6 + 6 + 3)𝑚𝑜𝑑10
𝑑13 = 10 − 102𝑚𝑜𝑑10

𝑑13 = 10 − 2
978-0-760-73261-6 is not a valid ISBN
𝑑13 = 8
𝑑12 = 10 − 3 7 + 8 + 3 6 + 9 + 3 3 + 6 + 3 7 + 9 + 3 7 + 9 + 3 8 𝑚𝑜𝑑10
𝑑12 = 10 − (21 + 8 + 18 + 9 + 9 + 6 + 21 + 9 + 21 + 9 + 24)𝑚𝑜𝑑10
𝑑12 = 10 − 155𝑚𝑜𝑑10
𝑑12 = 10 − 5 7-86936-79798-5
𝑑12 = 5
𝑑12 = 10 − 3 1 + 3 + 3 2 + 3 + 3 4 + 2 + 3 6 + 5 + 3 9 + 3 + 3 3 𝑚𝑜𝑑10
𝑑12 = 10 − (3 + 3 + 6 + 3 + 12 + 2 + 18 + 5 + 27 + 3 + 9)𝑚𝑜𝑑10
𝑑12 = 10 − 𝑚𝑜𝑑10
𝑑12 = 10 − 91𝑚𝑜𝑑10
𝑑12 = 10 − 1
𝑑12 = 9
6011012391452317
𝟔0𝟏1𝟎1𝟐3𝟗1𝟒5𝟐3𝟏7
𝟏𝟐 0 𝟐 1 𝟎 1 𝟒 3 𝟏𝟖 1 𝟖 5 𝟒 3 𝟐 7
𝟏+𝟐+0+ 𝟐+1+ 𝟎+1+𝟒+ 3+𝟏+𝟖+1+ 𝟖+ 5+𝟒+3+𝟐+ 7

32 ≡ 0𝑚𝑜𝑑10
The word CRYPTOGRAPHY originated from two Greek words, “krypto”
which means hidden and “graphene” which means writing. It is the
making or breaking of secret codes. It uses two processes namely:
1. ENCRYPTION – the process of transforming plain text into code
form using certain algorithm.
Example: MAHAL KITA (plain text) – original message
SGNGR QOZG (coded form) – Cipher text

2. DECRYPTION – the process of converting back the coded message


into plain text.
Methods of CRYPTOGRAPHY
1. Ceasar Cipher (Shift Cipher)
2. Using a Modulo Operator
KEY – refers to the strings of information that is used to
reveal the encrypted message into readable form.
1. Using the key of shift 3 to the right, encrypt the word
“BEAUTIFUL”.

EHDXWLIXO
2. Decrypt the cipher text, “HMWNXYRFX”, using the key of
5 shifts to the left.

CHRISTMAS
USING MODULO OPERATOR – the sender of the message
uses the key K to encrypt and 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.
1. Encrypt the message “ I like you”, let m=22

𝑐 ≡ 𝑝 + 𝑚 𝑚𝑜
I l i k e y o u 𝑐 ≡ 21 + 22
E H EGA U K Q 𝑐 ≡ 43𝑚𝑜𝑑2
𝑐 ≡ 17
2. Decrypt the message “AJZ” m=22 to the right
𝑛 = 26 − 𝑚
𝑝 ≡ 𝑐 + 𝑛 𝑚𝑜𝑑26 END
𝑝 ≡ (0 + 4)𝑚𝑜𝑑26
𝑝≡4
𝑝 ≡ 4𝑚𝑜𝑑26

You might also like