Anda di halaman 1dari 8

TUGAS KRIPTOGRAFI 2011

DWI KUSRIANTO PUTRO


J2F008098

Diketahui suatu data akan dienkripsi dengan system berikut:


Metode yang digunakan adalah FCB dengan panjang blok 8-bit dengan panjang blok 40 bit
(setiap blok akan mempunyai 5 blok kecil dengan panjang blok 8 bit) dengan mengunakan
kunci yang dihasilkan oleh suatu keystream generator dan setiap blok kecil menggunakan
kunci yang berbeda sesuai dengan indek blok kecil tersebut, Fungsi Enkripsi didefinisikan
sebagai berikut:
1.
2.
3.
4.

Geser kiri antrian sejauh 2


(hasil langkah satu) XOR Kj
Geser ke kanan (hasil langkah kedua) sejauh 1
(hasil langkah tiga) XOR Kj

Kj

Ci

Pi

IV yang digunakan adalah HARUS


Adapun keystream generator yang digunakan adalah

Bit kunci EKSTERNAL (40 bit)

Bit kunci kiri (20 bit)

Bit kunci kiri (20 bit)

SL1

SL1

R1

L1

K1 = R1 + L1
SL1

SL1

R2

L2

K2 = R2 + L2
SL1

SL1

R3

L3
SL1

K3 = R3 + L3
SL1

R4

L4
SL1

K4 = R4 + L4
SL1

R5

K5 = R5 + L5

L5

Enkripsi kalimat KERJAKAN DENGAN BENAR dengan kata kunci eksternal DWIKU dengan
asumsi spasi tidak diperhitungkan.
Tabel ASCII
A
41

B
42

C
43

D
44

E
45

F
46

G
47

H
48

I
49

J
4A

K
4B

L
4C

M
4D

N
4E

O
4F

P
50

Q
51

R
52

S
53

T
54

U
55

V
56

W
57

X
58

Y
59

Z
5A

TUGAS KRIPTOGRAFI 2011


A
B
C
D
E
F
G
H
I
J
K
L
M

41
42
43
44
45
46
47
48
49
4A
4B
4C
4D

01000001
01000010
01000011
01000100
01000101
01000110
01000111
01001000
01001001
01001010
01001011
01001100
01001101

N
O
P
Q
R
S
T
U
V
W
X
Y
Z

4E
4F
50
51
52
53
54
55
56
57
58
59
5A

DWI KUSRIANTO PUTRO


J2F008098

01001110
01001111
01010000
01010001
01010010
01010011
01010100
01010101
01010110
01010111
01011000
01011001
01011010

Diketahui:

P: KERJAKAN DENGAN BENAR


Kj: DWIKU
IV: HARUS
Keystream generator

Ditanya :
Hasil enkripsi
Jawab :
1. IV HARUS
Alfabet
H,A,R,U,S

ASCII (biner)
01001000, 01000001, 01010010, 01010101, 01010011

2. Kj = DWIKU
Alfabet
D,W,I,K,U

ASCII (biner)
01000100, 01010111, 01001001, 01001011, 01010101

TUGAS KRIPTOGRAFI 2011

DWI KUSRIANTO PUTRO


J2F008098

Bit kunci EKSTERNAL (40 bit)

0100010001010111010010010100101101010101
Bit kunci kiri (20 bit)

Bit kunci kiri (20 bit)

01000100010101110100

10010100101101010101

SL1

10001000101011101000

SL1

00101001011010101011
SL1

SL1

00010001010111010001

01010010110101010110

10100101101010101100

SL1

01000101011101000100

0010001010111010001010100101101010101100

SL1

01001011010101011001

SL1

10001010111010001000

0001000101011101000101010010110101010110

SL1

SL1

00100010101110100010

1000100010101110100000101001011010101011

0100010101110100010001001011010101011001

SL1

10010110101010110010

1000101011101000100010010110101010110010

3. Proses Enkripsi Karakter ke-1 (K)


IV=
0100100001000001010100100101010101010011 harus
SL2
0010000100000101010010010101010101001101 sift left 2
XOR K1
1000100010101110100000101001011010101011 k1

SR1

XOR P1(K)

XOR K1

1010100110101011110010111100001111100110
0101010011010101111001011110000111110011 sift right 2
1000100010101110100000101001011010101011
1101110001111011011001110111011101011000
01001011 k
10010111 97

Proses Enkripsi Karakter ke-2 (E)

IV=
SL2
XOR K2

SR1

XOR P2(E)

XOR K2

0100000101010010010101010101001110010111
0000010101001001010101010100111001011101
0001000101011101000101010010110101010110
0001010000010100010000000110001100001011
1000101000001010001000000011000110000101
0001000101011101000101010010110101010110
1001101101010111001101010001110011010011
01000101

11011110 DE

TUGAS KRIPTOGRAFI 2011

DWI KUSRIANTO PUTRO


J2F008098

Proses Enkripsi Karakter ke-3 (R)

IV=
SL2
XOR K3

SR1

XOR P3(R)

XOR K3

0101001001010101010100111001011111011110
0100100101010101010011100101111101111001
0010001010111010001010100101101010101100
0110101111101111011001000000010111010101
1011010111110111101100100000001011101010
0010001010111010001010100101101010101100
1001011101001101100110000101100001000110
01010010

11000101 C5
Proses Enkripsi Karakter ke-4 (J)

IV=
SL2
XOR K4

SR1

XOR P4(J)

XOR K4

0101010101010011100101111101111011000101
0101010101001110010111110111101100010101
0100010101110100010001001011010101011001
0001000000111010000110111100111001001100
0000100000011101000011011110011100100110
0100010101110100010001001011010101011001
0100110101101001010010010101001001111111
01001010
00000111 07

Proses Enkripsi Karakter ke-5 (A)

IV=
SL2
XOR K5

SR1

XOR P4(A)

XOR K5

0101001110010111110111101100010100000111
0100111001011111011110110001010000011101
1000101011101000100010010110101010110010
1100010010110111111100100111111010101111
1110001001011011111110010011111101010111
1000101011101000100010010110101010110010
0110100010110011011100000101010111100101
01000001

00101001 29
Proses Enkripsi Karakter ke-6 (K)

IV=
SL2
XOR K1

SR1

XOR P6 (K)

XOR K1

1001011111011110110001010000011100101001
0101111101111011000101000001110010100110
1000100010101110100000101001011010101011
1101011111010101100101101000101000001101
1110101111101010110010110100010100000110
1000100010101110100000101001011010101011
0110001101000100010010011101001110101101
01001011
00101000 28

TUGAS KRIPTOGRAFI 2011

DWI KUSRIANTO PUTRO


J2F008098

Proses Enkripsi Karakter ke-7 (A)

IV=
SL2
XOR K2

SR1

XOR P7(A)

XOR K2

1101111011000101000001110010100100101000
0111101100010100000111001010010010100011
0001000101011101000101010010110101010110
0110101001001001000010011000100111110101
1011010100100100100001001100010011111010
0001000101011101000101010010110101010110
1010010001111001100100011110100110101100
01000001

11100101 E5
Proses Enkripsi Karakter ke-8 (N)

IV=
SL2
XOR K3

SR1

XOR P8(N)

XOR K3

1100010100000111001010010010100011100101
0001010000011100101001001010001110010111
0010001010111010001010100101101010101100
0011011010100110100011101111100100111011
1001101101010011010001110111110010011101
0010001010111010001010100101101010101100
1011100111101001011011010010011000110001
01001110

11110111 F7
Proses Enkripsi Karakter ke-9 (D)

IV=
SL2
XOR K4

SR1

XOR P9(D)

XOR K4

0000011100101001001010001110010111110111
0001110010100100101000111001011111011100
0100010101110100010001001011010101011001
0101100111010000111001110010001010000101
1010110011101000011100111001000101000010
0100010101110100010001001011010101011001
1110100110011100001101110010010000011011
01000100
10101101 AD

Proses Enkripsi Karakter ke-10 (E)

IV=
SL2
XOR K5

SR1

XOR P10 (E)

XOR K5

0010100100101000111001011111011110101101
1010010010100011100101111101111010110100
1000101011101000100010010110101010110010
0010111001001011000111101011010000000110
0001011100100101100011110101101000000011
1000101011101000100010010110101010110010
1001110111001101000001100011000010110001
01000101

11011000 D8

TUGAS KRIPTOGRAFI 2011

DWI KUSRIANTO PUTRO


J2F008098

Proses Enkripsi Karakter ke-11 (N)

IV=
SL2
XOR K1

SR1

XOR P11 (N)

XOR K1

0010100011100101111101111010110111011000
1010001110010111110111101011011101100000
1000100010101110100000101001011010101011
0010101100111001010111000010000111001011
1001010110011100101011100001000011100101
1000100010101110100000101001011010101011
0001110100110010001011001000011001001110
01001110
01010011 53

Proses Enkripsi Karakter ke-12 (G)

IV=
SL2
XOR K2

SR1

XOR P12(G)

XOR K2

1110010111110111101011011101100001010011
1001011111011110101101110110000101001111
0001000101011101000101010010110101010110
1000011010000011101000100100110000011001
1100001101000001110100010010011000001100
0001000101011101000101010010110101010110
1101001000011100110001000000101101011010
01000111

10010101 95
Proses Enkripsi Karakter ke-13 (A)

IV=
SL2
XOR K3

SR1

XOR P13(A)

XOR K3

1111011110101101110110000101001110010101
1101111010110111011000010100111001010111
0010001010111010001010100101101010101100
1111110000001101010010110001010011111011
1111111000000110101001011000101001111101
0010001010111010001010100101101010101100
1101110010111100100011111101000011010001
01000001

10011101 9D
Proses Enkripsi Karakter ke-14 (N)

IV=
SL2
XOR K4

SR1

XOR P14(N)

XOR K4

1010110111011000010100111001010110011101
1011011101100001010011100101011001110110
0100010101110100010001001011010101011001
1111001000010101000010101110001100101111
1111100100001010100001010111000110010111
0100010101110100010001001011010101011001
1011110001111110110000011100010011001110
01001110
11110010 F2

TUGAS KRIPTOGRAFI 2011

DWI KUSRIANTO PUTRO


J2F008098

Proses Enkripsi Karakter ke-15 (B)

IV=
SL2
XOR K5

SR1

XOR P15 (B)

XOR K5

1101100001010011100101011001110111110010
0110000101001110010101100111011111001011
1000101011101000100010010110101010110010
1110101110100110110111110001110101111001
1111010111010011011011111000111010111100
1000101011101000100010010110101010110010
0111111100111011111001101110010000001110
01000010

00111101 3D
Proses Enkripsi Karakter ke-16 (E)

IV=
SL2
XOR K1

SR1

XOR P16 (E)

XOR K1

0101001110010101100111011111001000111101
0100111001010110011101111100100011110101
1000100010101110100000101001011010101011
1100011011111000111101010101111001011110
0110001101111100011110101010111100101111
1000100010101110100000101001011010101011
1110101111010010111110000011100110000100
01000101
10101110 AE

Proses Enkripsi Karakter ke-17 (N)

IV=
SL2
XOR K2

SR1

XOR P17(N)

XOR K2

1001010110011101111100100011110110101110
0101011001110111110010001111011010111010
0001000101011101000101010010110101010110
0100011100101010110111011101101111101100
0010001110010101011011101110110111110110
0001000101011101000101010010110101010110
0011001011001000011110111100000010100000
01001110

01111100 7C
Proses Enkripsi Karakter ke-18 (A)

IV=
SL2
XOR K3

SR1

XOR P18(A)

XOR K3

1001110111110010001111011010111001111100
0111011111001000111101101011100111110010
0010001010111010001010100101101010101100
0101010101110010110111001110001101011110
0010101010111001011011100111000110101111
0010001010111010001010100101101010101100
0000100000000011010001000010101100000011
01000001

01001001 49

DWI KUSRIANTO PUTRO


J2F008098

TUGAS KRIPTOGRAFI 2011


Proses Enkripsi Karakter ke-19 (R)

IV=
SL2
XOR K4

SR1

XOR P19(R)

XOR K4

1111001000111101101011100111110001001001
1100100011110110101110011111000100100111
0100010101110100010001001011010101011001
1000110110000010111111010100010001111110
0100011011000001011111101010001000111111
0100010101110100010001001011010101011001
0000001110110101001110100001011101100110
01010010
01010001 51

Proses Enkripsi Karakter ke-20 ( )

IV=
SL2
XOR K5

SR1

XOR P20( )

XOR K5

Pi
K
E
ASCII 4B 45
ASCII 97
Ci

0011110110101110011111000100100101010010
1111011010111001111100010010010101001000
1000101011101000100010010110101010110010
0111110001010001011110000100111111111010
0011111000101000101111000010011111111101
0100010101110100010001001011010101011001
0111101101011100111110001001001010100100
00000000
01111011 7b

R J
52 4A

A K
A N D
E
41 4B 41 4E 44 45
ENKRIPSI
DE C5 07 29 28 E5 F7 AD D8

BEL )
(

P: KERJAKAN DENGAN BENAR


C: BEL) ( S =| I Q {

N G A
4E 47 41

N B
4E 42

53 95 9D F2
S

E
45

N
4E

A R
41 52

3D AE 7C 49 51
=

|
I
Q

0
7B