2. Kriptografi dan Sistem Keamanan Komputer
Standar Sistem Keamanan
Enkripsi Kunci Simetrik
Number Theory
Enkripsi Kunci Publik
Autentikasi Pesan dan Fungsi Hash
2011-2012-3 Anung Ariwibowo 2
3. Konvensional / Private-key / Single-key
Pengirim dan Penerima berbagi kunci enkripsi
Basis dari semua penyandian klasik
Penyandian yang dikenal sebelum 1970an
Paling banyak digunakan
2011-2012-3 Anung Ariwibowo 3
4. plaintext – pesan asli
ciphertext – pesan terenkripsi / tersandikan
cipher – algoritma untuk mengubah plaintext
ke ciphertext, algoritma penyandian
key – informasi yang digunakan oleh algoritma
penyandian, diketahui oleh pengirim dan
penerima
encipher (encrypt) – mengubah plaintext ke
ciphertext
decipher (decrypt) – mengembalikan plaintext
dari ciphertext
2011-2012-3 Anung Ariwibowo 4
5. cryptography – ilmu tentang metode-metode
dan prinsip-prinsip enkripsi
cryptanalysis (codebreaking) – ilmu tentang
prinsip-prinsip untuk men-decipher cihpertext
tanpa keberadaan key
cryptology – bidang ilmu yang mencakup
cryptography dan cryptanalysis
2011-2012-3 Anung Ariwibowo 5
6.
7. Syarat yang diperlukan untuk penggunaan
enkripsi simetrik yang aman
Algoritma enkripsi yang 'kuat'
Kunci hanya diketahui oleh sender / receiver
Notasi matematis
Y = EK(X)
X = DK(Y)
Asumsi
Algoritma enkripsi diketahui
ada secure channel untuk mendistribusikan key
8. Sistem kriptografi dibedakan berdasarkan
beberapa hal
Tipe operasi yang digunakan
substitution / transposition / product
Jumlah kunci yang digunakan
single-key or private / two-key or public
Bagaimana plaintext diolah menjadi ciphertext
block / stream
9. Membongkar key dan pesan asli
Teknik yang digunakan
cryptanalytic attack
brute-force attack
10. ciphertext
algoritma & ciphertext diketahui, pendekatan
statistik, mengidentifikasi plaintext
known plaintext
know/suspect plaintext & ciphertext
chosen plaintext
select plaintext and obtain ciphertext
chosen ciphertext
select ciphertext and obtain plaintext
chosen text
select plaintext or ciphertext to en/decrypt
11. unconditional security
seberapa pun sumber daya komputasi dan waktu
yang tersedia, sandi tidak dapat dipecahkan.
Ciphertext tidak cukup menyediakan informasi
untuk secara unik menentukan plaintext yang
sesuai.
computational security
diberikan sumber daya komputasi yang terbatas,
sandi tidak dapati dipecahkan (misal: waktu yang
digunakan untuk menjalankan algoritma lebih besar
daripada umur alam semesta)
12. Mencoba setiap kemungkinan key
serangan paling dasar
proporsional dengan ukuran key
asumsinya plaintext diketahui / dikenal
Key Size (bits) Number of Alternative Time required at 1 Time required at 106
Keys decryption/µs decryptions/µs
32 232 = 4.3 109 231 µs = 35.8 minutes 2.15 milliseconds
56 256 = 7.2 1016 255 µs = 1142 years 10.01 hours
128 2128 = 3.4 1038 2127 µs = 5.4 1024 years 5.4 1018 years
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years
26 characters 26! = 4 1026 2 1026 µs = 6.4 1012 years 6.4 106 years
(permutation)
13. Simbol
Huruf
Angka
Tanda baca
Simbol-simbol plaintext digantikan oleh
simbol-simbol lain
Sebagai rangkaian bit, substitution mengganti
pola bit plaintext dengan pola bit ciphertext
14. Sandi substitusi yang paling awal dikenal
dalam sejarah
Pertama kali digunakan untuk merahasiakan
pesan militer
Substitusi huruf dengan huruf ke-3 berikutnya
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
2011-2012-3 Anung Ariwibowo 14
15. Transformasi didefinisikan sebagai pemetaan
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Secara matematis memberikan nilai kepada
masing-masing huruf
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Secara matematis sandi Caesar didefinisikan
sebagai fungsi pemetaan
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26)
16. Hanya ada 26 kemungkinan sandi
Brute force search
Diberikan ciphertext, coba semua
kemungkinan shifts
Plaintext harus bisa dikenali
GCUA VQ DTGCM
CVBG HSSLG CVBZ
18. Setiap huruf plaintext dipetakan ke huruf
ciphertext secara acak
Panjang key 26 huruf
abcdefghijklmnopqrstuvwxyz
DKVQFIBJWPESCXHTMYAUOLRGZN
ifwewishtoreplaceletters
WIRFRWAJUHYFTSDVFSFUUFYA
19. Total kemungkinan key
26!
4 x 1026
with so many keys, might think is secure
language characteristics
20. human languages bersifat redundant
"th lrd s m shphrd shll nt wnt"
Dalam bahasa Inggris huruf E paling banyak
digunakan
T,R,N,I,O,A,S
Z,J,K,Q,X cukup jarang digunakan
Tabel frekuensi huruf untuk berbagai bahasa
single, double & triple letter frequencies
21.
22. Substitusi monoalphabetic tidak mengubah
frekuensi relatif huruf dalam bahasa yang
digunakan
Arabian scientists in 9th century
Hitung frekuensi huruf dalam ciphertext
Sandi monoalphabetic harus mengidentifikasi
setiap huruf
Tabel frekuensi double/triple letters dapat
membantu memecahkan sandi
23. Diberikan ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
Hitung frekuensi relatif huruf
Single letters
P dan Z dipetakan ke e atau t
Double letters
ZW dipetakan ke th
ZWP = the
24. proceeding with trial and error finally get:
it was disclosed yesterday that several informal but
direct contacts have been made with political
representatives of the viet cong in moscow
2011-2012-3 Anung Ariwibowo 24
25. Jumlah kombinasi key tidak menjamin
keamanan sandi Monoalphabetic
Sandikan multiple letters
Contohnya Playfair Cipher
Charles Wheatstone in 1854
named after his friend Baron Playfair
26. Matriks huruf 5X5 berdasarkan sebuah kata-
kunci
Kata-kunci tidak mengandung huruf duplikat
Isi matriks sisanya dengan huruf yang lain
keyword MONARCHY
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
27. plaintext is encrypted two letters at a time
1. if a pair is a repeated letter, insert filler like 'X’
2. if both letters fall in the same row, replace each with
letter to right (wrapping back to start from end)
3. if both letters fall in the same column, replace each
with the letter below it (again wrapping to top from
bottom)
4. otherwise each letter is replaced by the letter in the
same row and in the column of the other letter of the
pair
28. 26 x 26 = 676 digrams
Membutuhkan tabel frekuensi dengan 676 entri
Lebih banyak kemungkinan ciphertext
Banyak digunakan bertahun-tahun
US & British military in WW1
it can be broken, given a few hundred letters
Statistics don't lie
29. improve security using multiple cipher
alphabets
make cryptanalysis harder with more
alphabets to guess and flatter frequency
distribution
use a key to select which alphabet is used for
each letter of the message
use each alphabet in turn
repeat from start after end of key is reached
30. simplest polyalphabetic substitution cipher
effectively multiple caesar ciphers
key is multiple letters long K = k1 k2 ... kd
ith letter specifies ith alphabet to use
use each alphabet in turn
repeat from start after d letters in message
decryption simply works in reverse
31. write the plaintext out
write the keyword repeated above it
use each key letter as a caesar cipher key
encrypt the corresponding plaintext letter
eg using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
32. have multiple ciphertext letters for each
plaintext letter
hence letter frequencies are obscured
but not totally lost
start with letter frequencies
see if look monoalphabetic or not
if not, then need to determine number of
alphabets, since then can attach each
33. Mencari solusi dalam ruang masalah yang
besar
Problem space
Traveling Salesman Problem
Diberikan n kota
Cari rute terpendek yang mengunjungi setiap kota
tepat satu kali
Problem space: n!
O(n!)
2011-2012-3 Anung Ariwibowo 33
34. Quiz:
1000 kombinasi kota per detik
10 kota
2011-2012-3 Anung Ariwibowo 34
35. Stallings, "Cryptography and Network
Security"http://williamstallings.com/Cryptography/
Schneier, "Applied Cryptography"
http://www.schneier.com/book-applied.html
Thomas L Noack,
http://ece.uprm.edu/~noack/crypto/
Slides
tjerdastangkas.blogspot.com/search/label/ikh323
2011-2012-3 Anung Ariwibowo 35