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. Himpunan bilangan
Operasi yang ditentukan terhadap elemen-
elemen himpunan tersebut
Hasil operasi berada di dalam himpunan
(closure)
Memenuhi
associative law: (a.b).c = a.(b.c)
has identity e: e.a = a.e = a
has inverses a-1: a.a-1 = e
Jika memenuhi hukum commutative
a.b = b.a
Abelian group
4. exponentiation
repeated application of operator
a3 = a.a.a
Elemen identitas
e=a0
Cyclic group
Setiap elemen adalah exponent dari sebuah
generator
b = ak for some a and every b in group
a = generator
b = elemen-elemen himpunan selain a
5. a set of “numbers”
with two operations (addition and
multiplication) which form:
an abelian group with addition operation
and multiplication:
has closure
is associative
distributive over addition: a(b+c) = ab + ac
if multiplication operation is commutative, it
forms a commutative ring
if multiplication operation has an identity and
no zero divisors, it forms an integral domain
6. modulo operator “a mod n” didefinisikan
sebagai sisa bagi jika a dibagi n
congruence: a ≡ b mod n
jika dibagi n, a dan b memiliki sisa bagi yang sama
100 ≡ 34 mod 11
b disebut residue dari operasi a mod n
untuk integer: a = qn + b
biasanya dipilih sisa bagi positif terkecil
ie. 0 <= b <= n-1
modulo reduction
-12 mod 7 = -5 mod 7 = 2 mod 7 = 9 mod 7
7. a mod n
a≥0
a = qn + b
q≥0
b≥0
a<0
'overshoot'
a = qn + b
q<0
b≥0
2011-2012-3 Anung Ariwibowo 7
8. a mod n
0≤a<1
a = qn + b
q≥0
b≥0
Modular Multiplicative Inverse
aa-1 = 1
2011-2012-3 Anung Ariwibowo 8
9. Sebuah bilangan bukan-nol b membagi a jika
untuk sebuah bilangan m didapatkan a=mb
(a,b,m adalah integers)
d.kl. b membagi a tanpa sisa
dituliskan: b|a
dikatakan b adalah pembagi dari a
Contoh: all of 1,2,3,4,6,8,12,24 divide 24
10. 'clock arithmetic'
menggunakan sejumlah berhingga bilangan
loops back from either end
modular arithmetic is when do addition &
multiplication and modulo reduce answer
can do reduction at any point
a+b mod n = [a mod n + b mod n] mod n
11. bisa diterapkan kepada sembarang group of
integers
Zn = {0, 1, … , n-1}
Membentuk commutative ring for addition
dengan multiplicative identity
note some peculiarities
if (a+b)=(a+c) mod n
then b=c mod n
but if (a.b)=(a.c) mod n
then b=c mod n only if a is relatively prime to
n
14. a common problem in number theory
GCD (a,b) of a and b is the largest number that
divides evenly into both a and b
eg GCD(60,24) = 12
often want no common factors (except 1) and
hence numbers are relatively prime
eg GCD(8,15) = 1
hence 8 & 15 are relatively prime
15. an efficient way to find the GCD(a,b)
memanfaatkan teorema:
GCD(a,b) = GCD(b, a mod b)
Versi iteratif
EUCLID(a,b)
1. A = a; B = b
2. if B = 0 return A
3. R = A mod B
4. A = B
5. B = R
6. goto 2
16. Versi rekursif
Kuis(a,b)
if b = 0 then return a
else Kuis(b, a mod b)
2011-2012-3 Anung Ariwibowo 16
17. 1970 = 1 x 1066 + 904 gcd(1066, 904)
1066 = 1 x 904 + 162 gcd(904, 162)
904 = 5 x 162 + 94 gcd(162, 94)
162 = 1 x 94 + 68 gcd(94, 68)
94 = 1 x 68 + 26 gcd(68, 26)
68 = 2 x 26 + 16 gcd(26, 16)
26 = 1 x 16 + 10 gcd(16, 10)
16 = 1 x 10 + 6 gcd(10, 6)
10 = 1 x 6 + 4 gcd(6, 4)
6 = 1 x 4 + 2 gcd(4, 2)
4 = 2 x 2 + 0 gcd(2, 0)
18. Sebuah integer x yang memenuhi
a-1 ≡ x mod n
ax ≡ aa-1 mod n
ax ≡ 1 mod n
hanya ada jika a dan n coprime
Contoh
3-1 ≡ x mod 11
3x ≡ 1 mod 11
x=4
0 ≤ x < 11
2011-2012-3 Anung Ariwibowo 18
19. Modular Multiplicative Inverse
http://en.wikipedia.org/wiki/Modular_multiplicative
_inverse
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 19