Security 6
Security 6
@?A @
CBEDAA5DAGF
❚ H5IKJ5L*M#N OQPSR,TT5L0IKT
❚ UVM PXWO;Y5Z[M \=W5]0P^\=_0`GUVM PaWOQYK\@_0\@b P)TKN T
❚ c.\TKN JGd*_J5M PXWOeN Y@_gfXIJ5]*_5N h[LIT
❚ H5IKJ5M IOji)IPk\@_0`Al*L5m*b N JGi
IP^UVM PaWO;YKTP)TOQI=noT
❚ pqN Z[N OQ\=b0HN Z[_\OeL*M IT
❚ rVLOs]I=_OeN J0\KOsN Y@_
!#" $
%&
')(*" (*+,-'.(0/.1,
2 " 3
-4
,% (5" 76.18(5+
9;:
1 2
UX\=M Yb |[l\=M OeN J*N W0\@_OjN _g\Os]*M IIK[\=_`>;Y@L*M 0W\=M OQP (Confidentiality);
❚ p\)I@|[l\=M OeN J5N W\=_OjN _g\;Y@L*M W\=M OQP
W*M YKOQYKJY@b TK
(Integrity);
❙ What if someone pretending to be Alice forges a message
and sends it to Bob? ( Authentication);
❙ What if Alice denies sending of the message? (Non-
repudiation of origin, Digital Signature) ;
❙ What if Bob denies the receipt of the message? (Non-
repudiation of the destination).
❚ What if Bob wants to provide access to selective
individuals (Access Control).
3 4
yKAz @?z @A >Cy5AzA Ag> @Au
Insecure Channel
❚ A tool for confidentiality, integrity, authentication, non-
repudiation, and digital signatures. Plain Text Encryption Cipher Text Decryption Plain Text
A Algorithm Algorithm B
❚ Cryptography: the science of encryption (the good M C = E(K,M) M = D(K,C)
guys).
❚ Cryptanalysis: analysis of cryptographic algorithms (the Key= K Key= K
bad guys). Secure Channel
❚ Cryptosystems: C = E(K,M)
❙ Secret Key (also known as single key, symmetric key) M = D(K,C)
where
❘ existing for more than 1000 years.
K = key
❙ Public Key (also known as two key, asymmetric key) E = Encryption Algorithm
❘ since 1974; D= Decryption Algorithm
M = Plaintext Message
❘ both secret key and public key systems are in use and C = Ciphertext Message
competing with each other.
5 6
1
A? @A
>w
A
>G
A5Az
A KAz ??>
7 8
9 10
? @? 5Az
C ?A?@
< @A
zA
❚ Substitution followed by permutation followed by
substitution followed by permutation .... ❚ DES is a product cipher with 56 bit key and 64 bit block
size for plaintext and ciphertext.
❚ Best known examples:
❚ Developed by IBM and adopted by NIST (1977) with
❙ DES (Data Encryption Standard); NSA approval for unclassified information (such as
❙ SKIPJACK. EFT).
❚ Mathematics to design a strong product cipher is ❚ Efficient to implement in hardware, but relatively slow if
classified. implemented in software.
❚ Breakable by exhaustive search of key space for ❚ Encryption and Decryption algorithms are public, but the
known plaintext, chosen plaintext, chosen design principles are classified.
ciphertext. ❚ The size of the key (56-bits) is one of the most
❚ Thus, security is based on computational complexity controversial aspects of DES.
of computing the key.
11 12
2
¡ ¢*AA =£ ¥¤¡A
Encryption Decryption
❚ Algorithm: 64-bit input 64-bit output
❙ initial permutation;
❙ the 56 bit key is used to generate sixteen 48-bit keys; 32-bit Ln 32-bit Rn 32-bit Ln 32-bit Rn
❙ final permutation.
+ +
32-bit Rn+1 32-bit Ln+1 32-bit Rn+1
32-bit Ln+1
❙ Triple DES.
15 16
❙ ®
❚ Jan, 1997, NIST initiated the development of AES
❙ ´
*
: +87K +,/[-,% K³,¯
:0:%9;(0818 © 4o30:
µeK°:$
" ¯1,:" ¯ ❙ Features
❙ ©
/(0/jº,»
ª^¬
@9Q(e/ ❘ support 128-bit block sizes and 128-, 192-, and
2❙ ¼ 7(5+j$8/8(¯^ +68:+8Q$
+,6£8 :+@°j 81j³
$
¬" 6o9Q(0 256- bit key sizes.
17 18
3
¤¡uv?Á§C AA ¤ uv?Á§C AA y
·> @Auv Â> =uv*A @
❚ Confidentiality depends only on the secrecy of the key.
❚ Attacker is assumed to know E and D. ❚ Long-term keys
❚ Uses: ❙ prolonged use increases exposure.
❙ Solves confidentiality and integrity problems; ❚ Session keys
❙ Can be used for Authentication; ❙ short-term keys communicated by means of
❙ Can be used to securely store information on insecure media; ❘ long-term secret keys;
❙ Integrity check.
❘ public key technology.
❚ Disadvantages:
❙ do not scale well: ❚ Public Key Cryptosystem
❘ With N parties we need to generate and distribute N*(N-1)/2 ❙ solves the problem of key distribution provided a
keys. reliable channel for communication of public keys can
❙ Key Distribution Problem: How to get the key to Alice and be implemented.
Bob? and to others?
❙ If everyone knows the Key, it is no longer a secret. 19 20
< .
v>yKAz =g> @Au < ÃKAz ÄAG @u A @
Plaintext Encryption
Ciphertext
Decryption
Plaintext ❚ A brief history
A B
Algorithm Algorithm ❙ Concept conceived by Diffe and Hellman in 1976.
❙ Rivest, Shamir and Adleman (RSA) were first to describe
B's Public Key B's Private Key a public key system in 1978.
Reliable Channel ❙ Merkle and Hellman published a different solution, later in
C = E(KE-B,,M) 1978.
security is based on infeasibility of M = D(KD-B,C)
■
where
❙ Many proposal have been broken (including the 1978
computing B's private key, given KE-B = Public (encryption) key of B, Kerkle-Hellman proposal broken by Shamir).
the knowledge of known to all
KD-B = Private (decryption) key of B, ❚ Current systems
– B's public key
– chosen plaintext
known only to B ❙ RSA;
E = Encryption Algorithm
– chosen ciphertext D= Decryption Algorithm ❙ Diffie-Hellman;
M = Plaintext Message
C = Ciphertext Message ❙ El Gamal
21 22
4
¤¡ ¿ *A =£ ¤ ¿ D@GA
❚ Example: ❚ Fastest implementations of RSA can encrypt kilobits/sec;
❙ d= 3 ❚ Fastest implementations of DES can encrypt megabits/sec;
❙ e= 7 ❚ This thousand-fold difference in speed is likely to remain
❙ n = 10 independent of technological advances;
❙ Let M = 2 ❚ It is often proposed that RSA be used for secure exchange of
DES keys;
❙ C = 27 mod 10 = 128 mod 10 = 8
❚ Key size of RSA is selected by the user;
❙ M = 83 mod 10 = 512 mod 10 = 2
❙ many implementations choose n to be 154 digits (512 bits)
❙ This works for any M
so the key (n,e) is 1024 bits;
❚ How hard it is to compute d given (e,n)? ❙ key size of DES is 64 bits (56 bits plus 8 parity bits) ;
❙ We do not know. But it is no harder than factoring n into ❚ Key size should be chosen conservatively;
p*q.
❙ at present it appears that 130 digit numbers can be
❙ Thus, security of RSA is no better than complexity of the factored in several months using lot of idle workstations.
factoring problem.
25 26
27
Reliable Channel 28
29 30
5
8w5w[
Æ ¦ .
u{?CG
·Ç ? BAÆ8F? ¦ ?> A @
A
❚ System-wide constants for all principals ❚ Also known as message digest or message authentication
❙ p prime number; codes
❙ g integer. ❚ H(M) = m
❚ A chooses random SA, sends TA = gSA mod p to A. ❙ H is the one-way function, i.e., easy to compute but difficult to
❚ B chooses random SB, sends TB = gSB mod p to B. invert;
❚ A computes K = TBSA mod p = g(SB*SA)mod p. ❙ M is a long message (say 1 megabyte);
❚ B computes K = TASB mod p = g(SA*SB)mod p. ❙ m is a short (say 128 bit) digest.
❚ Requires no prior communication between A and B.
❚ Authenticity of a message can be checked by computing
❚ Security depends on the difficulty of computing
H(M) = m, and comparing with the transmitted m.
x given y=gx mod p
This is the discrete logarithm problem which has similar but ❚ This requires that the digest m be either
not identical complexity to factorization. ❙ transmitted over a more secure channel than M, e.g., M is a
❚ Susceptible to the bucket-brigade (intruder-in-the-middle) attack. disk transmitted by mail, m is transmitted via phone, or
K1 K2 ❙ m be digitally signed which may be easier than signing M.
A
A C B 31 32
33 34
6
¿ @A>ÈÆ ?A> ¿ zAz@?A
5A @ KAz @?zAA ¿ zzA@?A
❚ Secret key cryptography
❚ Is safe from eavesdropping (thus more secure than ❙ Alice and Bob verify each other's identity
password based) but is vulnerable to other attacks; ❘ r is a key.
❙ what if someone gains access to system A; A rA B
challenge
❙ network address impersonation. rA encrypted with KAB
challenge rB
rB encrypted with KAB
37 38
¤¡w[
@
A{?A =?AÁv @£
=> =Aóò
A =A=uCA.?@
❚ îìXé@ïðìñêìí ❚ KDC (Key Distribution Center)
❙ With secret key cryptographic authentication each
A “I’m Alice” encrypted with KAB, timestamped B node needs to know n-1 keys if there are n nodes;
Reply encrypted with KAB, timestamp+1 ❙ Alternatively, all keys are stored at a single place,
ä@åæ=ç è éëêìí
KDC;
❚ ❙ If A wants to talk to B,
“I’m Alice” encrypt r1 with eB ❘ A first talks to KDC securely since A and KDC share a key
and asks for B's key;
r1, encrypt r2 with eA ❘ KDC authenticates A, generates a key KAB common to A
and B, sends it to A by encrypting it with A's key, sends
r2 the same to B by encrypting with B's key (ticket).
41 42
7
@A> @Åò
@@uC.?@A
=> =Aóò
A =A=uCA.?@
5A @ *A =£
❚ Certification Authority
❚ KDC continued ❙ public key equivalent of KDC;
❙ Disadvantages: ❙ generates signed messages called certificates for
❘ If KDC is compromised, all the network resources are each node (X.509 specifies the standard);
vulnerable;
❙ unlike KDC
❘ Failure of KDC stalls everything in the network;
❘ CA need not be on-line;
❘ KDC might be a performance bottleneck;
❘ not security-sensitive;
❘ multiple KDCs can alleviate the last two problems. ❘ network will not crash if CA crashes (but creating a new
user could be a problem);
❘ does not cause performance bottleneck;
❘ thus multiple CAs are not required.
43 44
@A> @Åò
@@uC.?@A
5A @ ¿ A>§A @=
ô!õ.ö ÷5ø ùeõ.úö;õ.ùeõ.ø ÷5õ¸öQõ
ûü!õ.ú&ýþÄõ.ú£úsÿ !õ.ú .ý !õ )öQþ
❚
!"#$&%!'
($)+* ,.-/* ($021Ð ÍXØsÓqÐ ÏeÎsÓÔ Ð Ô Ö=×eÒKØ[Í#ÎsÔ)×sÑ)Û#Ò7ΣÏeÎsÓÔ Ð ØsÞ ÍaÑ ×sÒKÔ ÚÎ
❚ CA continued
❙ Disadvantage:
❘ certificate revocation is not trivial;
❙
âe)+5Ò768Ð Ó7Û 9.Ð âe)+-:Ø5Þ 3qÐ ÏeØ£ÎsÕÓÐ Ô ÓÐ Ñ Ü Ð ÎsÔ ÍXÚ0ÔÎ[ÚÒ7ÎÎ Ò74£ÎsÙ0Í#Σ×sÍ#ÙÔ Ò7á Û#Î[Ô ×!;ÚÐ Û Ú Ô ÚÎ[×eâeÎsÒ ØsÔ Ð ×eÓ Ô ×
❘ periodically posts a certificate revocation list (CRL) àeÎ[ØsâeâeÞ Ð ÎsÏ£ã
❙
45 46
KC?A ¿ A>
y @@
❚ *l M YKXN `*IJ0Y_0OQI=_OQ0m\KTI!`G\@LOs]YM#N J\OsN Y_5
l*M YKXN `*ITIJ*L5M IW0\PXnjI=_Ojn~IKJ5]\=_5N TKnLKN Oe]>b YMK
YK)I@M#]I\!`G;Y@M d0U¡no\OQI=M#N \=b TK
❚