MOD-10 ARITHMETIC
Mod-10 addition is the encryption engine. It must become reflexive — under a second per digit pair, no conscious thought.
1.1 Definition
Modular arithmetic is arithmetic on a finite set where numbers wrap around. A clock is mod-12. A day of the week is mod-7.
Mod-10 addition: add two digits normally, keep only the ones digit.
3 + 4 = 7 (no wrap) 7 + 6 = 13 → 3 (wrap: discard the 1) 8 + 2 = 10 → 0 (wrap: result is 0) 9 + 9 = 18 → 8 (wrap) 0 + 0 = 0
Notation: We write this as (a + b) mod 10, or sometimes a ⊕ b.
1.2 Properties
Commutativity: a ⊕ b = b ⊕ a
Associativity: (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
Identity: a ⊕ 0 = a
Self-inverse (with complement): There is no self-inverse in mod-10 the way XOR has (a XOR a = 0). Instead, every element has an additive inverse. The additive inverse of a is (10 − a) mod 10, also called the tens complement.
Tens complements: 0 → 0 (10 - 0 = 10 → 0) 1 → 9 2 → 8 3 → 7 4 → 6 5 → 5 6 → 4 7 → 3 8 → 2 9 → 1
This is critical: to decrypt, you do not subtract. You add the tens complement. This keeps the operation consistent and avoids negative numbers.
If ciphertext digit C = (P + K) mod 10
Then plaintext digit P = (C + K') mod 10
where K' = tens complement of KVerify:
P = 7, K = 6, C = (7+6) mod 10 = 3 Decrypt: (3 + 4) mod 10 = 7 = P [K' = 10-6 = 4]
1.3 The Addition Table
Memorize this. Every row and column contains each digit exactly once. This is important: it means every ciphertext digit is equally likely given any plaintext digit (when K is uniformly random).
| + | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
| 2 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 |
| 3 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 |
| 4 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 | 3 |
| 5 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 | 3 | 4 |
| 6 | 6 | 7 | 8 | 9 | 0 | 1 | 2 | 3 | 4 | 5 |
| 7 | 7 | 8 | 9 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
| 8 | 8 | 9 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 9 | 9 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
1.4 The Complement (Decryption) Table
For decryption: add tens complement of key digit to ciphertext digit. Equivalently, this is (C − K + 10) mod 10 = (C + (10−K)) mod 10.
| K | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| K' | 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
When decrypting, replace each key digit K with K', then add mod 10 normally.
1.5 Chaining
Mod-10 operations chain without interaction. This is crucial for hand operation: each pair (plaintext digit, key digit) is independent. There is no carry. No borrow. No memory required between column operations.
This distinguishes it from standard addition (which carries) and makes hand encipherment much less error-prone.
1.6 Exercises — Module 1
Work these with pencil. No calculator.
1.1 Compute the following mod-10 sums:
a) 4 + 7 b) 9 + 9 c) 0 + 5 d) 6 + 4 e) 3 + 8 f) 7 + 7 g) 1 + 9 h) 5 + 5 i) 2 + 0 j) 8 + 3
a) 1, b) 8, c) 5, d) 0, e) 1, f) 4, g) 0, h) 0, i) 2, j) 1
1.2 Give the tens complement of each digit 0–9.
0→0, 1→9, 2→8, 3→7, 4→6, 5→5, 6→4, 7→3, 8→2, 9→1
1.3 Decrypt the following (P = (C + K') mod 10):
C = 3, K = 6 → P = ? C = 0, K = 7 → P = ? C = 5, K = 5 → P = ? C = 9, K = 9 → P = ? C = 1, K = 0 → P = ?
P = 7 (K'=4, 3+4=7)
P = 3 (K'=3, 0+3=3)
P = 0 (K'=5, 5+5=10→0)
P = 0 (K'=1, 9+1=10→0)
P = 1 (K'=0, 1+0=1)
1.4 Verify: encrypt then decrypt returns original. Pick any five digit pairs (P, K), compute C, then recover P.
1.5 Add these digit strings mod-10, column by column:
Plaintext: 3 7 1 9 2 4 0 6 Key: 8 4 6 3 7 1 5 9 Ciphertext: ?
Then decrypt the result.
Ciphertext: 1 1 7 2 9 5 5 5
Decrypt with K' = 2 6 4 7 3 9 5 1:
(1+2)(1+6)(7+4)(2+7)(9+3)(5+9)(5+5)(5+1) mod 10
= 3 7 1 9 2 4 0 6 — original plaintext recovered.
Random digit pairs. Type the mod-10 sum. Target: under 1 second.
Random digit. Type its tens complement. Target: under 1 second.