5.2 Applications of Modular Arithmetic
5.2 Applications of Modular Arithmetic
1+0+2+6+4+1+6+2+2+3+6+4
+ 2 + 0 + 2 + 2 + 1 + 8 + 8 = 60
Because 60 ≡ 0 mod 10, 5143 6332 4510
1589 is a valid credit card number.
Cryptology
Now find the sum of the new list of digits;
the final sum must be congruent to 0 mod
10. The Luhn algorithm is demonstrated in
the next example.
Related to codes on books and grocery items are
secret codes. These codes are used to send
messages between people, companies, or nations.
It is hoped that by devising a code that is difficult to
break, the sender can prevent the communication
from being read if it is intercepted by an
unauthorized person.
Cryptology is the study of making and breaking
secret codes.
Before we discuss how messages are coded, we need
to define a few terms. Plaintext is a message before it
is coded.
The line
SHE WALKS IN BEAUTY LIKE THE NIGHT
from Lord Byron’s poem “She Walks in Beauty Like
The Night” is in plaintext.
Ciphertext is the message after it has been
written in code. The line
a. code CATHERINE.
b. decode TGLY ESP EPCCTMWP.
=
If the encrypting code is to shift each letter of the plaintext
message m positions, then the corresponding letter in the
ciphertext message is given by
c (p + m) mod 26 where
m is the number of positions the letter is shifted
p is the numerical equivalent of the plaintext letter
c is the numerical equivalent of the ciphertext letter.
Solution:
a. The encrypting congruence is
c (p + 11) mod 26. Replace p by the
numerical equivalent of each letter of
plaintext and determine c.
m = 11, the number of positions the letter is
shifted
The results for CATHERINE are shown below.