Anda di halaman 1dari 5

2.

i) Mesej atau teks biasa, KATA LALUAN, telah ditulis dalam bentuk teks cipher
menggunakan kaedah Hill Cipher. Matriks encipher 2 X2 digunakan . Tunjukkan
secara terperinci teks cipher tersebut. Matriks encipher tersebut adalah :

[ ]
2 1
2 3

1.

A

6 7

Q R

1
7

1
9

2
0

21 2
2

1
8

G H I

8 9

M N

1
0

1
1

1
2

1
3

1
5

16

2
3

2
4

2
5

1
4

K A

11
1

20
1

L
12

L
1

12
21

1
14

K
A

[ ] [ ] [ ]
11
1

2 1
2 3

[ ][ ]

22+ 1
22+3

[ 40+1
40+3 ]

= 43

L 2 1 12
=
A 2 3 1

[ ][ ]

[2424+1+3]

= 27

L 2 1 12 =
U 2 3 21

[ ][ ]

[2424+21
+63 ]

[ ][ ]

[2+14
2+ 42 ]

T 2 1 20
A 2 3 1

A 2 1 1
=
N 2 3 14

[2325 ]

[ 41]
[ 25]
[ 45]

= 87

[ 16]

= 44

[ ][ ]

= 25

[ ][ ]
[ ][ ]

= 27

K 2 1 11
A 2 3 1
T 2 1 20
A 2 3 1

L 2 1 12
A 2 3 1

[23 ]

mod 26

= 43

[ 41]

[1517 ]

[ 25]

[251 ]

mod 26

mod 26

[ ][ ]

[ 45]

L 2 1 12
U 2 3 21

= 87

[ ][ ]

A 2 1 1
N 2 3 14

[ 1644]

[199 ]

mod 26

[1618 ]

mod 26

[2325 ]

[1517 ]
[251 ]

= A

[199 ]

= I

W
Y
O

= Q

= WYOQYASIPR

[1618 ]

= R

ii) Ciphertext SAKNOXAOJX telah di dekripsi dengan kaedah Hill

Chipter menggunakan matriks

[ ] . Cari mesej yang dihantar.

4 1
3 2

[ ]
4 1
3 2

1.

[ ]
a b
c d

(a x d ) ( b x c)
= (4x2) - (3x1)
=
8 - 3 = 5
1

11

15

21

1
5

19

1
7
2
3

1
9
1
1

2
1
5

23

25

17

25

Reciprocal mod 26
5 = 21

[ ]
4 1
3 2

21

2 1
3 4

[
]

2 1
3 4

] [ ] mod 26

42 21
16 5
=
63 84
15 6

[ ]
16 5

4. Chiptertext
S
19
1

K
11
14

O
15
24

A
1
15

J
10

X
24

5. Encryption key x chiptertext

][ ]

][ ]

176+70 246
= 165+ 84 = 249

][ ]

240+120
360
= 225+ 144 = 369

][ ]

16 +75
91
= 15+ 90 = 105

][ ]

160+120 280
= 150+ 144 = 294

S 16 5 19
A 15 6 1

K 16 5 11
N 15 6 14

O 16 5 15
X 15 6 2 4

A 16 5 1
O 15 6 15

J 16 5 10
X 15 6 24

+5 = 309
[304
285+6 ] [ 291 ]

[235 ]

mod 26

][ ]

[1512]

mod 26

][ ]

][ ]

[131 ]

][ ]

[225]

mod 26

mod 26

[209 ]

mod 26

6. Susun perkataan
23

12

15

22

13

20

WE LOVE MATH