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

[ ]
2 1
2 3

1.

[ ]
a b
c d

= ( a x d ) ( c x b)

(2x3)(2x1)
62=4

K A

11
1

20
1

12

L
1

12
21

1
14

K
A

[ ] [ ]
2 1
2 3

[ ][ ]

T 2 1 20
A 2 3 1

11
1

[2325 ]

[ 41]

= 43

[ ][ ]

= 27

[ ][ ]

= 87

[ ][ ]

= 44

[ 25]

L 2 1 12
A 2 3 1

[ 45]

L 2 1 12
U 2 3 21

[ 16]

A 2 1 1
N 2 3 14

[ ][ ]

= 25

[ ][ ]

= 43

[ 41]

[1517 ]

[ ][ ]

= 27

[ 25]

[251 ]

mod 26

[ 4587]

[199 ]

mod 26

[ 16]

[1618 ]

mod 26

[23 ]

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

L 2 1 12
A 2 3 1

[ ][ ]

[ ][ ]

= 44

L 2 1 12
U 2 3 21
A 2 1 1
N 2 3 14

mod 26

[2325 ]
[1517 ]

W
Y
O

= Q
2

[251 ]

= A

[199 ]

= I

= WYOQYASIPR

[1618 ]

= R

ii) Ciphertext SAKNOXAOJX telah di dekripsi dengan kaedah Hill

Chipter menggunakan matriks

1.

[ ]
4 1
3 2

[ ] . Cari mesej yang dihantar.

4 1
3 2

[ ]
a b
c d

(a x d ) ( b x c)
= (4x2) - (3x1)
=
8 - 3 = 5
Reciprocal mod 26
5 = 21
2. Perlu buat inverse matriks

[ ]
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

3. Chiptertext
S
19
1

11
14

15
24

1
15

10

24

4. Encryption key x chiptertext

][ ]

][ ]

= 249

[246 ]

[1512]

mod 26

][ ]

= 369

[360 ]

[225]

mod 26

][ ]

= 105

[ 91 ]

[131 ]

mod 26

][ ]

= 294

[ 280]

[209 ]

mod 26

S 16 5 19
A 15 6 1

K 16 5 11
N 15 6 14

O 16 5 15
X 15 6 14

A 16 5 1
O 15 6 1 5

J 16 5 10
X 15 6 24

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

[235 ]

mod 26

5. Susun perkataan
23

12

15

22

13

20

WE LOVE MATH