CT-1 Internals — Matrix Encryption Assignment
Message: "Maths is the poetry of logical ideas"
PART A (6 Marks)
Step 1: Translation Code (A = 1, B = 2, … Z = 26)
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
Step 2: Message Sentence — Count of Characters
Original message (uppercase):
"MATHS IS THE POETRY OF LOGICAL IDEAS"
Letters extracted (spaces & punctuation removed):
MATHSISTHEPOETRYOFLOGICALIDEAS
Total letters (n) = 30 ✓ (Even number — no padding needed)
Step 3: Encrypt Message to Numbers
Using translation code: each letter → its position number
M A T H S I S T H E P O E T R Y O F L O G I C A L I D E A S
13 1 20 8 19 9 19 20 8 5 16 15 5 20 18 25 15 6 12 15 7 9 3 1 12 9 4 5 1 19
Step 4: Message Matrix M (n × 2) = (15 × 2)
Arrange the 30 numbers row-by-row into a 15×2 matrix:
Pair Col 1 Col 2
M, A 13 1
T, H 20 8
S, I 19 9
S, T 19 20
H, E 8 5
P, O 16 15
E, T 5 20
R, Y 18 25
O, F 15 6
L, O 12 15
G, I 7 9
C, A 3 1
L, I 12 9
D, E 4 5
A, S 1 19
Step 5: Lock Matrix L (2 × 2)
Choose any 2×2 matrix L with non-zero determinant. We use:
1 2
3 5
Verification: det(L) = (1×5) − (2×3) = 5 − 6 = −1 ≠ 0 ✓ (L is invertible)
Step 6: Coded Matrix C = M × L (15 × 2)
Multiply each row of M by L: [m₁, m₂] × [[1,2],[3,5]] = [m₁ + 3m₂, 2m₁ + 5m₂]
Row [m1, m2] C col1 calc C col1 C col2 calc C col2
[13, 1] 13×1 + 1×3 = 16 16 13×2 + 1×5 = 31 31
[20, 8] 20×1 + 8×3 = 44 44 20×2 + 8×5 = 80 80
[19, 9] 19×1 + 9×3 = 46 46 19×2 + 9×5 = 83 83
[19, 20] 19×1 + 20×3 = 79 79 19×2 + 20×5 = 138 138
[8, 5] 8×1 + 5×3 = 23 23 8×2 + 5×5 = 41 41
[16, 15] 16×1 + 15×3 = 61 61 16×2 + 15×5 = 107 107
[5, 20] 5×1 + 20×3 = 65 65 5×2 + 20×5 = 110 110
[18, 25] 18×1 + 25×3 = 93 93 18×2 + 25×5 = 161 161
[15, 6] 15×1 + 6×3 = 33 33 15×2 + 6×5 = 60 60
[12, 15] 12×1 + 15×3 = 57 57 12×2 + 15×5 = 99 99
[7, 9] 7×1 + 9×3 = 34 34 7×2 + 9×5 = 59 59
[3, 1] 3×1 + 1×3 = 6 6 3×2 + 1×5 = 11 11
[12, 9] 12×1 + 9×3 = 39 39 12×2 + 9×5 = 69 69
[4, 5] 4×1 + 5×3 = 19 19 4×2 + 5×5 = 33 33
[1, 19] 1×1 + 19×3 = 58 58 1×2 + 19×5 = 97 97
∴ C L⁻¹ = M (verified ✓)
Step 7: Key Matrix K = L⁻¹
For L = [[1,2],[3,5]], det(L) = −1
L⁻¹ = (1/det) × [[d, −b],[−c, a]] = (1/−1) × [[5, −2],[−3, 1]]
-5 2
3 -1
∴ K = L⁻¹ (verified ✓)
Step 8: Information Given to Partner
C (Coded [16, 31] [44, 80] [46, 83] [79, 138] [23, 41] [61, 107] [65, 110]
Matrix) [93, 161] [33, 60] [57, 99] [34, 59] [6, 11] [39, 69] [19, 33]
[58, 97]
L⁻¹ (Key [[-5, 2], [3, -1]]
Matrix)
Translation A=1, B=2, C=3, … Z=26
Key
PART B (4 Marks)
Decryption: Find M using M = C L⁻¹ or M = CK
We use: M = C × K, where K = L⁻¹ = [[-5, 2], [3, -1]]
Each row of C: [c₁, c₂] × [[-5,2],[3,-1]] = [−5c₁ + 3c₂, 2c₁ − c₂]
C row [c1,c2] m1 calc m1 m2 calc m2 Letter 1 Letter 2
[16, 31] -5×16 + 3×31 = 13 13 2×16 - 31 = 1 1 M A
[44, 80] -5×44 + 3×80 = 20 20 2×44 - 80 = 8 8 T H
[46, 83] -5×46 + 3×83 = 19 19 2×46 - 83 = 9 9 S I
[79, 138] -5×79 + 3×138 = 19 19 2×79 - 138 = 20 20 S T
[23, 41] -5×23 + 3×41 = 8 8 2×23 - 41 = 5 5 H E
[61, 107] -5×61 + 3×107 = 16 16 2×61 - 107 = 15 15 P O
[65, 110] -5×65 + 3×110 = 5 5 2×65 - 110 = 20 20 E T
[93, 161] -5×93 + 3×161 = 18 18 2×93 - 161 = 25 25 R Y
[33, 60] -5×33 + 3×60 = 15 15 2×33 - 60 = 6 6 O F
[57, 99] -5×57 + 3×99 = 12 12 2×57 - 99 = 15 15 L O
[34, 59] -5×34 + 3×59 = 7 7 2×34 - 59 = 9 9 G I
[6, 11] -5×6 + 3×11 = 3 3 2×6 - 11 = 1 1 C A
[39, 69] -5×39 + 3×69 = 12 12 2×39 - 69 = 9 9 L I
[19, 33] -5×19 + 3×33 = 4 4 2×19 - 33 = 5 5 D E
[58, 97] -5×58 + 3×97 = 1 1 2×58 - 97 = 19 19 A S
Decoded numbers → letters → reassemble → original message:
"MATHS IS THE POETRY OF LOGICAL IDEAS"
Yay! Success!