You are on page 1of 7

Importance of Network

Security?
r Think about…
The most private, embarrassing or valuable
15:
m
piece of information you’ve ever stored on a
computer
Network Security Basics m How much you rely on computer systems to be
available when you need them
m The degree to which you question whether a
piece of email really came from the person
Last Modified: listed in the From field
4/21/2003 8:30:27 PM m How convenient it is to be able to access
private information online (e.g. buy without
entering all data, look up your transcript
without requesting a copy,…)
7: Network Security 1 7: Network Security 2

Importance of Network Types of attacks


Security
r Society is becoming increasingly reliant on § What are we worried about?
the correct and secure functioning of § Passive:
computer systems § Interception: attacks confidentiality.

m Medical records, financial transactions, etc. a.k.a., eavesdropping, “man-in-the-middle” attacks.


§ Traffic Analysis: attacks confidentiality, or anonymity.
r It is our jobs as professional computer Can include traceback on a network, CRT radiation.
scientists: § Active:
m To evaluate the systems we use to understand § Interruption: attacks availability.
their weaknesses
(a.k.a., denial-of-service attacks
m To educate ourselves and others to be wise § Modification: attacks integrity.
network consumers § Fabrication: attacks authenticity.
m To design networked systems that are secure

7: Network Security 3 7: Network Security 4

Fundamentals of Defense Cryptography


r The most widely used tool for securing
r What can we do about it?
information and services is cryptography.
r Restricted Access
r Cryptography relies on ciphers: mathematical
m Restrict physical access, close network ports,
functions used for encryption and decryption of a
isolate from the Internet, firewalls, NAT
gateways, switched networks message.
m Encryption: the process of disguising a message in such a
r Monitoring way as to hide its substance.
m Know what normal is and watch for deviations m Ciphertext: an encrypted message
r Heterogeneity/Randomness m Decryption: the process of returning an encrypted
message back into plaintext.
m Variety of Implementations, Random sequence
numbers, Random port numbers Original
Plaintext Ciphertext Plaintext
r Cryptography…… Encryption Decryption
7: Network Security 5 7: Network Security 6

1
What makes a good cipher? Ciphers
substitution cipher: substituting one thing for another
r The security of a cipher (like a substitution
monoalphabetic cipher: substitute one letter for another
m
cipher) may rest in the secrecy of its restricted
plaintext: abcdefghijklmnopqrstuvwxyz algorithm .
m Whenever a user leaves a group, the algorithm must
change.
ciphertext: mnbvcxzasdfghjklpoiuytrewq m Can’t be scrutinized by people smarter than you.
m But, secrecy is a popular approach :(
E.g.: Plaintext: bob. i love you. alice r Modern cryptography relies on secret keys, a
ciphertext: nkn. s gktc wky. mgsbc selected value from a large set (a keyspace), e.g., a
1024 -bit number. 21024 values!
Security is based on secrecy of the key, not the details
Q: How hard to break this simple cipher?: m
of the algorithm.
•brute force (how hard?) m Change of authorized participants requires only a change
•other? in key.
7: Network Security 7 7: Network Security 8

Keys: Symmetric vs Assymetric Session Keys


r The most common cryptographic tools are r Symmetric key algorithms are faster than
m Symmetric key ciphers asymmetric key algorithms
• Use same key to encrypt and decrypt r Often asymmetric key cryptography used to
• One key shared and kept secret exchange a shared secret key
• DES, 3DES, AES, Blowfish, Twofish, IDEA
• Fast and simple (based on addition, masks, and shifts) r This key called a symmetric session key is then
• Typical key lengths are 40, 128, 256, 512 used to encrypt this conversation with symmetric
m Asymmetric key ciphers key cryptograhy
• Pair of keys: one encrypts and another decrpyts r Each new conversation would use a different
• One key (the private key) must be kept secret; the other session key
key (the public key) can be freely disclosed
• RSA, El Gamal r Other benefits (In addition to efficiency)
• Slow, but versatile (usually requires exponentiation) m session keys also reduce the key exposure or amount of
• Typical key lengths are 512, 1024, 2048 encrypted text that could be collected to aid in analysis
m If session key compromised only get info in the last
session
7: Network Security 9 7: Network Security 10

Symmetric key crypto: DES Public key encryption algorithms


DES: Data Encryption Standard
r US encryption standard [NIST 1993] Two inter-related requirements:
r 56-bit symmetric key, 64 bit plaintext input
m initial permutation 1 . .
need a decryption function dB ( ) and an
m 16 identical “rounds” of function application, each using encryption function eB ( ) such that
different 48 bits of key
d (e (m)) = m e (d (m)) = m
m final permutation B B B B
r How secure is DES? 2 need public and private keys
m DES Challenge: 56-bit-key-encrypted phrase decrypted
(brute force) in a little over 22 hours (1999 DES Challenge .
for dB ( ) and eB ( ) .
III)
m no known “backdoor” decryption approach

r making DES more secure


m use three keys sequentially (3-DES) on each datum
m use cipher-block chaining
7: Network Security 11 7: Network Security 12

2
RSA RSA in a nutshell
1. Choose two large prime numbers p, q.
r Ronald L. Rivest, Adi Shamir and Leonard
(e.g., 1024 bits each)
M. Adleman
m Won 2002 Turing award for this work! 2. Compute n = pq, z = (p-1)(q -1 )
r Want a function eB that is easy to do, but 3. Choose e (with e< n) that has no common factors
hard to undo without a special decryption with z. (e, z are “relatively prime”).
key
4. Choose d such that ed-1 is exactly divisible by z.
r Based on the difficulty of factoring large (in other words: ed mod z = 1 ).
numbers (especially ones that have only
large prime factors) 5. Public key is (n,e). Private key is (n,d).

Why? (Will hint at)


7: Network Security 13 How? (Won’t discuss) 7: Network Security 14

RSA: Encryption, decryption RSA: small example


Bob chooses p=5, q=7. Then n=35, z=24.
0. Given (n,e) and (n,d) as computed above
e=5 (so e, z relatively prime).
1. To encrypt bit pattern (message), m, compute d=29 (so ed-1 exactly divisible by z.
e
c = m e mod n (i.e., remainder when m is divided by n)

2. To decrypt received bit pattern, c, compute letter m me c = me mod n


encrypt:
d
m = c d mod n (i.e., remainder when c is divided by n)
l 12 1524832 17

d
decrypt:
c c m = cd mod n letter
Magic d
m = (m e mod n) mod n 17 12
happens!
481968572106750915091411825223072000
l

7: Network Security 15 7: Network Security 16

RSA: Why? m = (m e ) d mod n Reversible


Number theory result: If p,q prime, n = pq, then
r What the private key encrypts the public
y y mod (p-1)(q -1)
x mod n = x mod n key decrypts
d r What the public key encrypts the private
(m e ) mod n = m ed mod n key decrypts
ed mod (p-1)(q -1)
If it were easy = m mod n
(using number theory result above)
to factor n into
p and q then we 1
= m mod n
would be in
(since we chose ed to be divisible by
trouble!
(p-1)(q-1) with remainder 1 )

= m
7: Network Security 17 7: Network Security 18

3
Practical matters Storing your keys
r Big primes like 5 and 7 (J) already r For both symmetric and asymmetric
generated big numbers like 481968572106750915091411825223072000 cryptography how do you store the keys?
m What would happen with 1024 bit keys? m Typical key lengths are 512, 1024, 2048
m Costly operations! r Can’t exactly memorize it
r Finding big primes? r Ok to store in on your computer? In a
shared file system? No!
r Normally stored in a file encrypted with a
pass phrase
r Pass phrase != your key

7: Network Security 19 7: Network Security 20

Using Cryptography Uses of Cryptography


r Secrecy/Confidentiality : ensuring
information is accessible only by
authorized persons
m Traditionally, the primary objective of cryptography.
m E.g. encrypting a message
r Authentication : corroboration of the
identity of an entity
m allows receivers of a message to identify its origin
m makes it difficult for third parties to masquerade as
someone else
m e.g., your driver’s license and photo authenticates your
image to a name, address, and birth date.

7: Network Security 21 7: Network Security 22

Uses of Cryptography Friends and enemies: Alice, Bob, Trudy

r Integrity : ensuring information has not been


altered by unauthorized or unknown means
m Integrity makes it difficult for a third party to
substitute one message for another.
Figure 7.1 goes here
m It allows the recipient of a message to verify it has not
been modified in transit.
r Nonrepudiation : preventing the denial of previous
commitments or actions
m makes it difficult for the originator of a message to r well-known in network security world
falsely deny later that they were the party that sent the r Bob, Alice want to communicate “securely”
message.
r Trudy, the “intruder” may intercept, delete, add
m E.g., your signature on a document.
messages

7: Network Security 23 7: Network Security 24

4
The language of cryptography Digital Signatures
plaintext K K plaintext Cryptographic technique Simple digital signature
A B
analogous to hand- for message m:
ciphertext written signatures. r Bob encrypts m with his
Figure 7.3 goes here r Sender (Bob) digitally signs private key d B, creating
document, establishing he signed message, d B(m).
is document owner/creator. r Bob sends m and d B(m) to
r Verifiable, nonforgeable : Alice.
recipient (Alice) can verify
that Bob, and no one else,
signed document.

7: Network Security 25 7: Network Security 26

Digital Signatures (more)


Message Digests
r Suppose Alice receives Alice thus verifies that:
msg m, and digital m Bob signed m.
signature dB(m) Computationally expensive Hash function properties:
m No one else signed m.
r Alice verifies m signed to public-key-encrypt r Many-to-1
m Bob signed m and not m’ .
by Bob by applying long messages r Produces fixed -size msg
Bob’s public key eB toNon-repudiation: Goal: fixed-length,easy to digest (fingerprint)
m Alice can take m, and r Given message digest x,
dB(m) then checks compute digital
computationally infeasible
eB(dB(m) ) = m. signature dB(m) to court signature, “fingerprint” to find m such that x =
r If eB(dB(m) ) = m, and prove that Bob r apply hash function H H(m)

whoever signed m must signed m. to m, get fixed size r computationally infeasible


message digest, H(m). to find any two messages m
have used Bob’s and m’ such that H(m) =
private key. H(m’).

7: Network Security 27 7: Network Security 28

Digital signature = Signed message digest Hash Function Algorithms


Bob sends digitally signed Alice verifies signature and
r Internet checksum r MD5 hash function widely
message: integrity of digitally signed
would make a poor used.
message:
message digest. m Computes 128-bit
message digest in 4-step
m Too easy to find
process.
two messages with m arbitrary 128-bit string
same checksum. x, appears difficult to
construct msg m whose
MD5 hash is equal to x.
r SHA-1 is also used.
m US standard
m 160-bit message digest

7: Network Security 29 7: Network Security 30

5
Authentication Authentication: another try
Protocol ap3.0: Alice says “I am Alice” and sends her
Goal: Bob wants Alice to “prove” her identity
secret password to “prove” it.
to him
Protocol ap1.0: Alice says “I am Alice”

Failure scenario?
Failure scenario??

7: Network Security 31 7: Network Security 32

ap4.0: Authentication: yet another


Authentication: yet another try
try
Protocol ap3.1: Alice says “I am Alice” and sends her Goal: avoid playback attack
encrypted secret password to “prove” it. Nonce: number (R) used onlyonce in a lifetime
ap4.0: to prove Alice “live”, Bob sends Alice nonce, R. Alice
I am Alice
must return R, encrypted with shared secret key
encrypt(password)

Failure scenario? Figure 7.11 goes here


Trudy can’t decrypt password
But can still replay it

Failures, drawbacks?
7: Network Security 33 7: Network Security 34

Authentication: ap5.0 ap5.0: security hole


ap4.0 requires shared symmetric key Man (woman) in the middle attack: Trudy poses
as Alice (to Bob) and as Bob (to Alice)
m problem: how do Bob, Alice agree on key?
m are public key techniques any better?

ap5.0: use nonce, public key cryptography


Figure 7.14 goes here

Figure 7.12 goes here

What proves eA is Alice’s public key? Need “certified” public


7: Network Security 35
keys 7: Network Security 36

6
Trusted Intermediaries Key Distribution Center (KDC)
r Alice,Bob need shared
Problem: Problem: symmetric key.
m How do two entities m When Alice obtains r KDC: server shares
establish shared Bob’s public key different secret key
secret key over (from web site, e- with each registered
network? mail, diskette), how user.
Solution: does she know it is r Alice, Bob know own
r Alice communicates with
m trusted key
Bob’s public key, not symmetric keys, KA-KDC KDC, gets session key R1, and
distribution center Trudy’s? K B-KDC , for KB-KDC(A,R1)
(KDC) acting as Solution: communicating with r Alice sends Bob
intermediary m trusted certification KDC. KB-KDC(A,R1), Bob extracts R1
between entities authority (CA) r Alice, Bob now share the
symmetric key R1.

7: Network Security 37 7: Network Security 38

Certification Authorities Establishing Trust


r Certification authority
(CA) binds public key to r Is the problem of establishing “trust” with a key
particular entity.
authority or certification authority the same as
r Entity (person, router,
etc.) can register its public establishing “trust” with anyone else?
key with CA. m Private Key: How do you agree on a shared secret key
m Entity provides “proof with the key authority?
of identity” to CA. m Public Key: CA can put their public key on a bulletin board
m CA creates certificate but how do you convince them that your public key really
binding entity to public r When Alice wants Bob’s public is your public key?
key. key:
m Certificate digitally r Problem is the same!!
r gets Bob’s certificate (Bob or
signed by CA. m Use out of band means
elsewhere).
m Public key of CA can be r BUT!!!! Once you establish trust with them you can
universally known (on r Apply CA’s public key to Bob’s
billboard, embedded in certificate, get Bob’s public use that to bootstrap trust with others
software) - unless have to key
change because private
key compromised 7: Network Security 39 7: Network Security 40

You might also like