Network Security
Where we are in the Course • Security crosses all layers Applicatjon Transport Network Link Physical CSE 461 University of Washington 2
Security Threats • “Security” is like “performance” • Means many things to many people • Must defjne the propertjes we want • Key part of network security is clearly statjng the threat model • The dangers and atuacker’s abilitjes • Can’t assess risk otherwise Introductjon to Computer Networks 3
Security Threats (2) • Some example threats • It’s not all about encryptjng messages Atuacker Ability Threat Eavesdropper Intercept messages Read contents of message Observer Inspect packet Collect conversatjons destjnatjons Intruder Compromised host Tamper with contents of message Impersonator Remote social engineering Trick party into giving informatjon Extortjonist Remote / botnet Disrupt network services Introductjon to Computer Networks 4
Risk Management • Security is hard as a negatjve goal • Try to ensure security propertjes and don’t let anything bad happen! • End-to-end principle in actjon (can’t trust network!) • Only as secure as the weakest link • Could be design fmaw or bug in code • But ofuen the weak link is elsewhere … ? Introductjon to Computer Networks 5
Risk Management (2) • 802.11 security … early on, WEP: • Cryptography was fmawed; can run cracking sofuware to read WiFi traffjc • Today, WPA2/802.11i security: • Computatjonally infeasible to break! • So that means 802.11 is secure against eavesdropping? Introductjon to Computer Networks 6
Risk Management (3) • Many possible threats • We just made the fjrst one harder! • 802.11 is more secure against eavesdropping in that the risk of successful atuack is lower. But it is not “secure”. Threat Model Old WiFi (WEP) New WiFi (WPA2) Break encryptjon from outside Very easy Very diffjcult Guess WiFi password Ofuen possible Ofuen possible Get password from computer May be possible May be possible Physically break into home Diffjcult Diffjcult 7
Cryptography
Cryptology • Rich history, especially spies / military • From the Greek “hidden writjng” • Cryptography • Focus is encryptjng informatjon • Cryptanalysis • Focus is how to break codes • Modern emphasis is on codes that are “computatjonally infeasible” to break • Takes too long compute solutjon Introductjon to Computer Networks 9
Uses of Cryptography • Encryptjng informatjon is useful for more than deterring eavesdroppers • Prove message came from real sender • Prove remote party is who they say • Prove message hasn’t been altered • Designing secure cryptographic scheme tricky! • Use approved design (library) in approved way Introductjon to Computer Networks 10
Internet Reality • Most of the protocols were developed before the Internet grew popular • It was a smaller, more trusted world • So protocols lacked security … • We have strong security needs today • Clients talk with unverifjed servers • Servers talk with anonymous clients • Security has been retrofjtued • This is far from ideal! Introductjon to Computer Networks 11
Goal and Threat Model • Goal is to send a private message from Alice to Bob • This is called confjdentjality • Threat is Eve will read the message • Eve is a passive adversary (observes) I networks ?? Bob Alice Eve Introductjon to Computer Networks 12
Encryption/Decryption Model • Alice encrypts private message (plaintext) using key • Eve sees ciphertext but not plaintext • Bob decrypts using key to get the private message Plaintext Plaintext I networks Eve I networks Encrypt Hi there Decrypt Bob Alice Ciphertext Key Key Network Introductjon to Computer Networks 13
Encryption/Decryption (2) • Encryptjon is a reversible mapping • Ciphertext is encrypted plaintext • Assume atuacker knows algorithm • Security does not rely on its secrecy • Algorithm is parameterized by keys • Security does rely on key secrecy • Must be distributed (Achilles’ heel) Introductjon to Computer Networks 14
Encryption/Decryption (3) Two main kinds of encryptjon: 1. Symmetric key encryptjon » , e.g., AES • Alice and Bob share secret key • Encryptjon is a bit mangling box 2. Public key encryptjon » , e.g., RSA • Alice and Bob each have a key in two parts: a public part (widely known), and a private part (only owner knows) • Encryptjon is based on mathematjcs (e.g., RSA is based on diffjculty of factoring) Introductjon to Computer Networks 15
Symmetric (Secret Key) Encryption • Alice and Bob have the same secret key, K AB • Anyone with the secret key can encrypt/decrypt Plaintext Plaintext I networks I networks Encrypt Hi there Decrypt Bob Alice Ciphertext Secret key Secret key K AB K AB Introductjon to Computer Networks 16
Public Key (Asymmetric) Encryption • Alice and Bob have public/private key pairs ( K B / K B -1 ) • Public keys are well-known, private keys are secret Plaintext Plaintext I networks I networks Encrypt Hi there Decrypt Bob Alice Ciphertext Bob’s Bob’s K B-1 K B private key public key Introductjon to Computer Networks 17
Public Key Encryption (2) • Alice encrypts w/ Bob’s pubkey K B ; anyone can send • Bob decrypts w/ his private key K B-1 ; only he can Plaintext Plaintext I networks I networks Encrypt Hi there Decrypt Bob Alice Ciphertext Bob’s Bob’s K B-1 K B private key public key Introductjon to Computer Networks 18
Key Distribution • This is a big problem on a network! • Ofuen want to talk to new partjes • Symmetric encryptjon problematjc • Have to fjrst set up shared secret • Public key idea has own diffjcultjes • Need trusted directory service • We’ll look at certjfjcates later Introductjon to Computer Networks 19
Symmetric vs. Public Key • Have complementary propertjes • Want the best of both! Property Symmetric Public Key Key Hard – share Easier – publish Distributjon secret per pair of public key per users user Runtjme Fast – good for Slow – few, small, Performanc high data rate messages e Introductjon to Computer Networks 20
Winning Combination • Alice uses public key encryptjon to send Bob a small private message • It’s a key! (Say 256 bits.) • Alice/Bob send messages with symmetric encryptjon • Using the key they now share • The key is called a session key • Generated for short-term use Introductjon to Computer Networks 21
Message Authentication
Goal and Threat Model • Goal is for Bob to verify the message is from Alice and unchanged • This is called integrity/authentjcity • Threat is Trudy will tamper with messages • Trudy is an actjve adversary (interferes) I networks ???? Trudy Bob Alice Introductjon to Computer Networks 23
Wait a Minute! • We’re already encryptjng messages to provide confjdentjality • Why isn’t this enough? Introductjon to Computer Networks 24
Encryption Issues • What will happen if Trudy fmips some of Alice’s message bits? • Bob will decrypt it, and … Bob Trudy Introductjon to Computer Networks 25
Encryption Issues (2) • What will happen if Trudy fmips some of Alice’s message bits? • Bob will receive an altered message Um?? yuiE#E3@ Bob Trudy Introductjon to Computer Networks 26
Encryption Issues (3) • Typically encrypt blocks of data • What if Trudy reorders message? • Bob will decrypt, and … 4 5 2 3 1 Bob Trudy Introductjon to Computer Networks 27
Encryption Issues (4) • What if Trudy reorders message? • Bob will receive altered message BUY NOW! DO NOT STOP OK! 4 5 2 1 3 Bob Trudy Introductjon to Computer Networks 28
MAC (Message Authentication Code) • MAC is a small token to validate the integrity/authentjcity of a message • Conceptually ECCs again • Send the MAC along with message • Validate MAC, process the message • Example: HMAC scheme Message MAC Alice Bob Introductjon to Computer Networks 29
MAC (2) • Sorta symmetric encryptjon operatjon – key shared • Lets Bob validate unaltered message came from Alice • Doesn’t let Bob convince Charlie that Alice sent the message Message I networks I networks Generate Validate Bob Alice MAC Secret key Secret key K AB K AB Introductjon to Computer Networks 30
Digital Signature • Signature validates the integrity/authentjcity of message • Send it along with the message • Lets all partjes validate • Example: RSA signatures Message Signature Alice Introductjon to Computer Networks 31
Digital Signature (2) • Kind of public key operatjon – pub/priv key parts • Alice signs w/ private key, K A 1 , Bob verifjes w/ public key, K A - • Does let Bob convince Charlie that Alice sent the message Message I networks I networks Sign Verify Bob Alice Signature Alice’s Alice’s K A-1 K A private key public key Introductjon to Computer Networks 32
Speeding up Signatures • Same tension as for confjdentjality: • Public key has keying advantages • But it has slow performance! • Use a technique to speed it up • Message digest stands for message • Sign the digest instead of full message Introductjon to Computer Networks 33
Recommend
More recommend