You are on page 1of 12

Cryptography Project

By: Akrawin Yongyingsakthaworn(Ta)


6161153
Table

Assigned No. Assigned Letter Assigned No. Assigned Letter Assigned No. Assigned Letter
0 _ 19 S 38 '
1 A 20 T
2 B 21 U
3 C 22 V
4 D 23 W
5 E 24 X
6 F 25 Y
7 G 26 Z
8 H 27 .
9 I 28 ,
10 J 29 !
11 K 30 ?
12 L 31 :
13 M 32 ;
14 N 33 "
15 O 34 (
16 P 35 )
17 Q 36 -
18 R 37 /
From Message to code:
Message: hout_sunshine._Love_you_all,_mates!

→→→
Change
From
Letters
To
number

Multiply the letter above which has been transcribed into numbers by encoding matrix

Encoding Matrix​ “​Key”

= Encoded Message
Which equals​: 767, 569, 339, 351, 48, 997, 790, 446, 444, 57, 716, 499, 411, 455, 63, 536, 433, 184, 169, 22, 551, 458,
207, 193, 25, 813, 720, 202, 135, 12, 1289, 1115, 453, 380, 39.

From code back to the message:

First, we need to find the inverse of the encoding matrix “Key”

A x A−1 = i Where “i” is identity and “A” is the encoding matrix.

7 5 6 7 1 1 0 0 0 0

8 8 2 1 0 0 1 0 0 0

11 9 1 0 0 0 0 1 0 0

18 11 12 14 2 0 0 0 1 0

25 24 6 3 0 0 0 0 0 1

Divide R1 by 7

1 5/7 6/7 1 1/7 1/7 0 0 0 0

8 8 2 1 0 0 1 0 0 0

11 9 1 0 0 0 0 1 0 0

18 11 12 14 2 0 0 0 1 0

25 24 6 3 0 0 0 0 0 1

-8 R1 + R2
-11 R1 + R3
-18 R1 + R4
-25 R1 + R5
1 5/7 6/7 1 1/7 1/7 0 0 0 0

0 16/7 -34/7 -7 -8/7 -8/7 1 0 0 0

0 8/7 -59/7 -11 -11/7 -11/7 0 1 0 0

0 -13/7 -24/7 -4 -4/7 -18/7 0 0 1 0

0 43/7 -108/7 -22 -25/7 -25/7 0 0 0 1

Divide R2 by 16/7

1 5/7 6/7 1 1/7 1/7 0 0 0 0

0 1 -17/8 -49/16 -1/2 -1/2 7/16 0 0 0

0 8/7 -59/7 -11 -11/7 -11/7 0 1 0 0

0 -13/7 -24/7 -4 -4/7 -18/7 0 0 1 0

0 43/7 -108/7 -22 -25/7 -25/7 0 0 0 1

-5/7 R2 + R1
-8/7 R2 + R3
13/7 R2 + R4
-43/7 R2 + R5

1 0 19/8 51/16 1/2 1/2 -5/16 0 0 0

0 1 -17/8 -49/16 -1/2 -1/2 7/16 0 0 0

0 0 -6 -15/2 -1 -1 -1/2 1 0 0

0 0 -59/8 -155/16 -3/2 -7/2 13/16 0 1 0

0 0 -19/8 -51/16 -1/2 -1/2 -43/16 0 0 1

Divide R3 by -6
1 0 19/8 51/16 1/2 1/2 -5/16 0 0 0

0 1 -17/8 -49/16 -1/2 -1/2 7/16 0 0 0

0 0 1 5/4 1/6 1/6 1/12 -1/6 0 0

0 0 -59/8 -155/16 -3/2 -7/2 13/16 0 1 0

0 0 -19/8 -51/16 -1/2 -1/2 -43/16 0 0 1

-19/8 R3 + R1
17/8 R3 + R2
59/8 R3 + R4
19/8 R3 + R5

1 0 0 7/32 5/48 5/48 -49/96 19/48 0 0

0 1 0 -13/32 -7/48 -7/48 59/96 -17/48 0 0

0 0 1 5/4 1/6 1/6 1/12 -1/6 0 0

0 0 0 -15/32 -13/48 -109/48 137/96 -59/48 1 0

0 0 0 -7/32 -5/48 -5/48 -239/96 -19/48 0 1

Divide R4 by -15/32

1 0 0 7/32 5/48 5/48 -49/96 19/48 0 0

0 1 0 -13/32 -7/48 -7/48 59/96 -17/48 0 0

0 0 1 5/4 1/6 1/6 1/12 -1/6 0 0

0 0 0 1 26/45 218/45 -137/45 118/45 -32/15 0

0 0 0 -7/32 -5/48 -5/48 -239/96 -19/48 0 1

-7/32 R4 + R1
13/32 R4 + R2
-5/4 R4 + R3
7/32 R4 + R5

1 0 0 0 -1/45 -43/45 7/45 -8/45 7/15 0

0 1 0 0 4/45 82/45 -28/45 32/45 -13/15 0

0 0 1 0 -5/9 -53/9 35/9 -31/9 8/3 0

0 0 0 1 26/45 218/45 -137/45 118/45 -32/15 0

0 0 0 0 1/45 43/45 -142/45 8/45 -7/15 1

Divide R5 by 1/45

1 0 0 0 -1/45 -43/45 7/45 -8/45 7/15 0

0 1 0 0 4/45 82/45 -28/45 32/45 -13/15 0

0 0 1 0 -5/9 -53/9 35/9 -31/9 8/3 0

0 0 0 1 26/45 218/45 -137/45 118/45 -32/15 0

0 0 0 0 1 43 -142 8 -21 45

1/45 R5 + R1
-4/45 R5 + R2
5/9 R5 + R3
-26/45 R5 + R4

1 0 0 0 0 0 -3 0 0 1

0 1 0 0 0 -2 12 0 1 -4
0 0 1 0 0 18 -75 1 -9 25

0 0 0 1 0 -20 79 -2 10 -26

0 0 0 0 1 43 -142 8 -21 45

​The inverse of the encoding matrix:

The inverse of encoding matrix “Key”

Multiply the encoded message to the inverse of the encoding matrix

Encoded message Inverse of the encoding matrix “Key”

= Decoded Message

Which equals (number) : ​8, 15, 21, 20, 0, 19,


21, 14, 19, 8, 9, 14, 5, 27, 0, 12, 15, 22, 5, 0, 25,
15, 21, 0, 1, 12, 12, 28, 0, 13, 1, 20, 5, 19, 29
Which equals (letter): ​hout_sunshine._Love_you_all,_mates!
Key:
Proving that the determinant of the key is equivalent to 1
using the row-echelon form:

-8/7 R1 + R2
-11/7 R1 + R3
-18/7 R1 + R4
-25/7 R1 + R5

-1/2 R2
-13/16 R2
-43/16 R2
-59/48 R3 + R4
-19/48 R3 + R5

-7/15 R4 + R5

Multiply the main diagonal elements to get the determinant of the matrix.

(7) x (16/7) x (-6) x (-15/32) x (1/45) = 1

Determinant = 1

Reflection
In this cryptography project, we are assigned as a class to apply the matrix to coding. We need to come up
with a message as a class then divide these messages into parts so that everybody would have 35 letters
each (incl. space, comma, period, etc.). After we got our part we need to come up with an encoding matrix or
"key" to encode our message. The encoding matrix must have a determinant of 1 and I chose to do a 5 x 5
dimension matrix. After that, we encode our message then decode it using the inverse of an encoding matrix
to show the decoded message.
This project helps me learn lots of things such as how secret code was created. When I was young, I always
wonder how spies in movies sent secret code to each other and why only someone was able to decode it.
After I've done this project, I started knowing how they could do that but it is not that simple. There are lots of
difficulties and obstacles in this project, one of them is making mistakes when calculating. Since we are
working with lots of numbers, a simple mistakes could be made, and to solve this, I carefully check every
single line twice and make sure that the answer when I decode would be right.

ESLOS:
- Strategic learner: In this project, I've applied the school's ESLOS of the strategic learner because we as a
group need to work on the different parts of the message so we have to carefully plan on the schedule on
what needs to be done on each day.
- Innovative Thinker: We applied the Innovative thinker idea to our work because we used different websites
to the matrix in the document because it is really hard to format mathematical equations in the google doc. We
also search for techniques and tips for how to use google docs effectively and we found many tricks to make
our use of time effective.

You might also like