21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing...

56
21-1 Internet Safety/Security Issues

Transcript of 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing...

Page 1: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-1

Internet Safety/Security Issues

Page 2: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-2

Problems…

World Wide Web:– Snooping: When browsing the internet, your information is passed

across many routers across many networks. Users can snoop your traffic, and know what sites you browse, maybe even see your private information.

• Solution: make sure that secure transfer is enabled for a site before transmitting any private information (https://, lock)

– Hacking: Users may hack into the back end systems on which many web stores run – stealing credit card numbers, social security numbers, and more

– Malicious plug-ins/exploits: Web sites may contain malicious programs that try to leverage bugs in your web browser to (in some way) compromise your computer

• Solution?

– Keep your browser updated!

– Try a less popular browser: Firefox, Opera, etc

Page 3: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-3

Problems…E-mail

– Worm: a software program that replicates itself throughout the internet, usually with the goal of generating lots of bogus internet traffic to crash servers via excessive load.

• Web Browsers may have critical vulnerabilities which allow malicious code to be run from a website. Since some email clients support rendering email messages in full HTML, you may be emailed a message with the malicious code inside. When you run it, you could be “infected”

– Solution: stay up to date with the latest Microsoft Security patches!

– Run pine, Mozilla Thunderbird, etc. . .

– Trojan Horse/Virii: software programs that claim to be useful software though also includes malicious instructions

– Email messages are send with executable attachments. Users who don’t know any better run them and become infected.

– Solution: NEVER run strange attachments!

– Phishing: Posing as a legitimate entity, an email directs you to a “spoofed” website where you unwittingly give confidential information to what looks like eBay, Citibank, Paypal, etc...

Page 4: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-4

Phishers Consider the following email I received to an email address that eBay does not have

on file...Dear valued customer Need Help?

We regret to inform you that your eBay account could be suspended.

To resolve this problems please click here (link is: http://219.239.88.61/images/member/.eBaySuspensionUS/eBaySuspension/signin.ebay.com/aw-cgi/eBayISAPI.dllSignIn-ssPageName-hhsin.php) and re-enter your account information. If your problems could not be resolved your account will be suspended for a period of 3-4 days, after this period your account will be terminated.

For the User Agreement, Section 9, we may immediately issue a warning, temporarily suspend, indefinitely suspend or terminate your membership and refuse to provide our services to you if we believe that your actions may cause financial loss or legal liability for you, our users or us. We may also take these actions if we are unable to verify or authenticate any information you provide to us.

Due to the suspension of this account, please be advised you are prohibited from using eBay in any way. This includes the registering of a new account. Please note that this suspension does not relieve you of your agreed-upon obligation to pay any fees you may owe to eBay.

Regards,Safeharbor Department eBay, Inc

– I also like this email from “paypal”. Curious again as they don't have this email address on file.

As part of our security measures, we regularly screen activity in the PayPal system. We recently noticed the following issue on your account:

We recently received a report of unauthorized credit card use associated with this account. As a precaution, we have limited access to your PayPal account in order to protect against future unauthorized transactions.

Case ID Number: PP-091-233-629

For your protection, we have limited access to your account until additional security measures can be completed. We apologize for any inconvenience this may cause.

To review your account and some or all of the information that PayPal used to make its decision to limit your account access, please visit the Resolution Center by following the link below:

https://www.paypal.com/cgi-bin/webscr?cmd=login-run (that's what's visible, yet the link is: http://www.securevers.e3z.de/)

If, after reviewing your account information, you seek further clarification regarding your account access, please contact PayPal by visiting the Help Center and clicking "Contact Us"

Page 5: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-5

Phun with PhishersHello ,Thanks for your mail back concerning the inquiry mail i sent to you. The price,condition also the pics i viewed is okay by me .And my client confirm there is no problem about the price($975 ) ,my client do pays with a {USA}cashier check,he has agreed to mail out as bank cashiers check of $3500. to you on my behalf to cover the shippment fees.About the shippment, that we be taken care by my me & my personal assistant,my personal assistant will be using his shipper to do the quick processing of the shipping of the (1987 Toyota Celica) to my client.So all you are to do after you will received the check in your mail, Just take out your sale amount and refer the remaining money to my shipper immediately through the westernunion or the money gramm outlet so to get the money fast and start the fast arrangement for the pickup of the (1987 Toyota Celica).Since you are the original owner of this item,and i am buying the item directly from you i will like you to write your full name to be on the check,with the mailing address which my client will be using to issued out the check to you.I do wish to trust you by refering the rest balance back to my shipper and also your fast doing to this transaction.I will like to hear fromyou if this is okay by you and you are ready to process ,if you aready to sale your item and promise refering the rest balance to my shipper immediately you received the check so can start the quick arrangement for the pickup. Any body that want to buy this item this item just tell therm that it as been sold. I will like to copmplete this transaction befor the new year. I be at my computer waiting to see your epky to my payment method mailed.THANKS AND MAIL ME BACK WITH YOUR DETAIL AS SOON AS POSSIBLE.

– http://www.ftc.gov

– P-p-p-powerbook!

• http://www.p-p-p-powerbook.com/

Page 6: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-6

Email irritantsAvoiding E-mail viruses, worms, and phishing

– Learn to read your email carefully--• look at headers

• don't view images in your email!

• Do you know the sender? Is the sender really who it says?

• Were you expecting an attachment on this email?

• Does the subject make sense considering the sender?

– E.g., “I thought you might enjoy this! ;o)”

– With an attachment of AnnaKournikova.jpg.vbs ......from your grandmother??

• Understand file extensions.

– Scan any attachments for viruses before you run them!• BU will provide you with anti-virus software (PCSC)!

– Try a different mail client (Thunderbird? http://www.mozilla.org)

Page 7: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-7

SPAM!

Spam is really annoying!– From a survey of workers at Fortune 500 companies conducted

by a Wellesley based research company• In 2003 companies lost (on avg) $874 per employee• In 2004, companies will lose $1,934 per employee

– How?• Workers spend nearly 15 minutes every day dealing with

(on average) 29 spam emails– Some estimates indicate SPAM accounts for >70% of the email

traffic on the entire Internet!– What are the response rates for spam?

• Try 1-2 one-thousandths percent!– So why do it?

• “Spammers” get paid ~$250 to send 500,000 emails

• Spam is spreading to Instant Messenger, as are all the previous “irritants”

Page 8: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-8

Hacking

• Hackers, in this case, try to exploit bugs in software, so they can do things that the original developers did not intend.

– Not all hackers are trying to harm …

• Remember:– All network communication happens with programs

– Programs may have bugs; the program may behave badly depending on what the user does

– These bugs might open the computer up to vulnerability

• Example: – Your operating system runs programs that accept connections

from other computers for legitimate purposes

– This program has a bug which, when receiving too much data, will allow the sender to run any program on the target machine

Page 9: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-9

How to “block” Hackers

• Keep hackers off your network interface:– Put a firewall between your machine and the outside world

• Firewall: A set of programs that monitor all communication passing into and out of a corporation’s intranet.

– Helps prevent, but doesn’t eliminate, unauthorized acces– Hardware firewall

• Physical device that sits between your machine and the network• Restricts access to your network, keeps people off your machine by

proxy– Software firewall

• Restricts access to your machine, as the above, however it runs on your machine.

• Fill the security holes on your computer:– Install security updates against “dangerous” software bugs:– http://www.info.apple.com/usen/security/index.html– http://www.microsoft.com/security/protect/

Page 10: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-10

Other Precautions

• Passwords:– Use strong passwords

• Passwords may be guess by automated trial-and-error or brute-force

• Include random numbers, symbols, etc

• Make passwords difficult to guess

• *NEVER* give out your password!

• Backup your files frequently– You never know what might happen

– For whatever reason, if your machine is fouled up, you’ll still have your important data

Page 11: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-11

Security and Cryptography

Page 12: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-12

Problems…

• Security/Privacy of Internet Traffic:– I send you my social security number, because you are supposed to

send me my credit report. This we would like to keep this information secure.

• I’m going to email it, is that OK?

• I enter it on a web page is that necessarily OK?

• Do we worry about security in the Postal Network?– When you send a letter to someone, you can be pretty confident that

the postal worker isn’t going to read it.

• The postal network is a trusted organization

– How do you ensure that someone hasn’t read your letter while it was in transit?

Page 13: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-13

Protecting Data

• Well, packets are like envelopes, are data packets inherently secure?

– HINT: Can we tell if someone has “tampered” with our packet? Does someone need to alter our packet in order to read it?

• Our messages may be intercepted and read– We have no way of knowing that a message has been

read (no signs of tampering)

• Any privacy solution must accept this reality

Page 14: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-14

Encryption Schemes• We will modify our messages so an eavesdropper will not

understand it– In computer science we call this encryption.

– I will encrypt my data, such that only the intended recipient will be able to understand it

– The recipient will need to decrypt the data in order to make sense of it.

Encryption schemes are considerably older than Computer Science.

– Ciphers are a relatively simple translation mechanism by which characters are shifted to another character.

• Caesar Cipher

• Vigenere Cipher

• Enigma Computer

Page 15: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-15

The Caesar Cipher

• The Caesar Cipher is one of the earliest known encryption schemes:

"RETURN TO ROME“

would be sent as

"UHWXUQ WR URPH“

and the receiver would return it to the form

"RETURN TO ROME“

Page 16: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-16

The Caesar Cipher

• How does it work?– The Caesar cipher encrypts by simply shifting each character some number of

characters to the right.

– To decrypt the message, the recipient must know the shift number used above, and will shift each character of the received message the same number characters to the left.

text: 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

cipher: 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

Page 17: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-17

Breaking the Caesar Cipher

• So what is the encryption scheme in a Caesar Cipher?

• Each side must know the number of character shifts – we call this a secret key

• How secure is a Caesar Cipher?– How to measure security?

• In the worst case: how much “work” would it take an eavesdropper to understand our original message?

• Let’s say we want to break a Caesar cipher by hand, or with a computer, what do we need to do?

– Method:

– Number of shifts:

– How do you know when you’re done?

Page 18: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-18

Breaking the Caesar Cipher

• We can be a bit more clever in breaking the Caesar Cipher.– Premise: Naturally, in English, some letters occur more frequently than others.

• We can determine, statistically, the frequency at which various letter appear in a sample of text.

• If we look at the characters that appear frequently in the cipher, we should try shifts that correlate frequently occurring characters to frequently occurring English characters

• So the Caesar Cipher is pretty weak -- Let’s look at a better encryption scheme

Page 19: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-19

the Vigenere Cipher

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 A 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 B 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 A C C 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 D 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 E 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 D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F GI I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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

• Named for Blasé de Vigenere (16th Century, France)

– Each row is a Caesar shift

• The system:– There is a secret key which is a

word.

– Each letter of the message to be encrypted is shifted to the letter in the corresponding position of the key-word

– To decrypt: The receiver look in the column of the key letter of that position, scan down the column for the encrypted character, and write the index letter of that row

Page 20: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-20

the Vigenere Cipher

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 ZA 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 B 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 A C C 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 D 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 E 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 D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F GI I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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

• Don’t worry, the Vigenere Cipher is essentially the “same thing” as a Caesar cipher

– Except now instead of shifting every character by the same amount, we shift each character by a different amount

– The letter of the Key tells us the shift amount

• Example:– Key: PASSPORT

– Message: ATTACK

– Encrypted: PTLSRY

Page 21: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-21

Breaking the Vigenere Cipher

• The Vigenere Cipher was considered relatively unbreakable until the 1860’s when Kasiski (Prussia) devised a method to guess at the keywords by spotting repeating character pairs in the encoded message.

– By observing character pairs that occur frequently, (and their distance from each other) one can speculate on the length of the keyword.

– Once the length of the keyword is known, you know how many different shifts are applied to each letter of the message (e.g., a 20 character message with a keyword of length 5 is “only” 5 different Caesar ciphers applied across all the characters)

• From there we can either try all the substitutions and look at the results

• Or use character frequency to try only the most likely results.

Page 22: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-22

The Enigma Cipher

• During WWII, the German’s used a very sophisticated Cipher, called the Enigma Machine

– The Enigma was actually invented in 1922 and sold commercially in Germany.

– The Enigma Machine shifted characters using a keyboard, three rotors and a “reflector”

• A character would enter the system, and be shifted by the first rotor. That shifted letter would then be shifted again by the second rotor, and shifted again by the third. The character would then hit the reflector, and bounce back through the same rotors in reverse order.

• Each rotor acted as an independent cipher, (a character entered would be output as a different character).

• Each rotor has the ability for 26 different shifts.

Page 23: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-23

The Enigma Cipher

– Clearly, knowing the settings of the rotors is key to decoding an Enigma message.

• To really complicate matters

– As each letter was typed, the first rotor would shift once.

– When the first rotor had shifted 26 times, the second rotor would shift once.

– The third rotor would shift once when the second rotor had shifted 26 times (like a car odometer).

» In this way, the same character would not have the same encoding throughout the message, nor would there be any obvious predictability in viewing the encoded message.

Page 24: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-24

The Enigma Cipher

• To decode, Enigma messages were reversible – that is, ME, and EM (with the right rotor settings, of course)

• So, In order to decode a message, a receiver needs knowledge of the initial state of the rotors when the message was started.

– And an enigma machine

– So, each machine operator had to know the what the rotor state would be on each day, and logs were kept of these settings (secret key)

Page 25: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-25

Breaking The Enigma Cipher

– Imagine guessing via trial and error…

• with three changing rotors, each with 26 possible positions, there are 17,576 possible positions of the rotors

– Eventually, teamwork broke (and re-broke the Enigma)

– Military Enigma’s were modified commercial Enigmas

– Polish mathematicians broke the code (and modified their own Enigma)

– A new modification emerges with double-encoding

– Turing and others devise systems to reduce the number of possible rotor configurations

– An EINS table was generated

– A four wheel Enigma was introduced

– A code book was captured from the U559 U-boat re-enabling interception

Page 26: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-26

Protecting data

• All of these encryption schemes assume that we can exchange some secret key that allows our recipient to decode the message.

– In these schemes context allows us to decode the messages

– We’re going to relax our problem a “bit”

• Alice wishes to send securely one bit to Bob in absence of private channel.

– private channel is a means of communication that is safe from any eavesdroppers / adversaries

– send securely: to send such that no third party can know what we have sent.

– Our previous examples have been breakable with enough hard work. Instead, we’ll change the problem and try to come up with an “unbreakable” algorithm to solve it.

Page 27: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-27

War!

• The red army and blue army have been at a standstill for weeks. War is imminent (as always) …

• red is waiting for an attack order from HQ, either:– “today” (0)

– “tomorrow” (1)

HQ

Page 28: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-28

Sending One Bit

• Red would like a secure transmission from HQ

HQ

Page 29: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-29

Sending One Bit

• Blue has high-tech surveillance equipment; hence we have no secure channel

HQ

Page 30: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-30

Abstracting the Problem

• In its abstract form, the problem is:– party A (Alice) wishes to communicate one bit (x) to party B (Bob)

– In the communication between A and B, no eavesdropper E (Eve) should learn the original bit x from viewing the transmission between A and B.

• So, Alice must encrypt the bit before sending it to Bob

– To “hide” the bit from illegitimate observers

• And Bob will then decrypt the message to recover the original bit

Encx Enc(x)

DecEnc(x) x

Page 31: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-31

Encrypting One Bit: Security

• To test if our encryption method is secure, we must ensure that Eve can learn nothing about the bit x, after observing only Enc(x).

– Given this definition, can we use either of the below encryption schemes?

Enc0

1

0

1

Enc0

1

1

0• maybe just flip the

bit?

• send what we mean.

Page 32: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-32

Encrypting One Bit: Attempt III

• let’s toss a coin before encrypting

Enc0

1

0 if heads, 1 if tails

1 if heads, 0 if tails

• if we get heads, we leave the bit alone

• if we get tails, we flip the bit• Thus, our secret key will be the outcome of the

flip.

Page 33: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-33

Encrypting One Bit: Security

• suppose that Eve sees Enc(x) = 0

• what’s the chance that x = 0?– It’s the chance of getting heads, i.e. 50%

• what’s the chance that x = 1?– It’s the chance of getting tails, i.e. 50%

• So even if Eve sees Enc(x) = 0, she can’t guess x with chance better than 50%

Page 34: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-34

Encrypting One Bit: Security

• now suppose that Eve sees Enc(x) = 1

• what’s the chance that x = 0?– it’s the chance of getting tails, i.e. 50%

• what’s the chance that x = 1?– it’s the chance of getting heads, i.e. 50%

• Similarly, if Eve sees Enc(x) = 1, she can’t guess x with chance better than 50%

Page 35: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-35

Encrypting One Bit: Security

• remember the conclusions of the previous two slides:

– if Eve sees Enc(x) = 1, she can’t guess x with chance better than 50%

– if Eve sees Enc(x) = 0, she can’t guess x with chance better than 50%

• so whatever value of Enc(x) Eve sees, she can’t guess x with better than 50% chance

• Which is essentially like not knowing x at all.– So, this would satisfy our previously definition of secure.

– Except, there’s a problem . . .

Page 36: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-36

Military Applications are fun!

• Sgt. Alice decides to attack today

HQ

0

Page 37: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-37

Military Application

• Sgt. Alice then flips a coin (suppose she got heads)

HQ

0heads

Page 38: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-38

Military Application

• Sgt. Alice sends Enc(x) = 0, all according to protocol

HQ

0

0heads

Page 39: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-39

Military Application

• Maj. Eve sees Enc(x) = 0, but she has no clue what that means, since she doesn’t know that Sgt. Alice tossed heads

HQ

0

0heads ????

Page 40: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-40

Military Application

• Private Bob receives Enc(x) = 0

HQ

0

0heads

Page 41: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-41

Military Application

• Bob is knows the system, but he didn’t see Alice’s coin.

• Eve doesn’t know what 0 means, but neither does Bob!

HQ

0

0heads

Page 42: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-42

What Went Wrong?

• We achieved the security goal– Our enemy can not guess the key!– Yet without key exchange -- Bob can’t decrypt!

• Bob and Alice need to exchange the secret key. – The secret key combined with knowledge of the

encryption scheme will allow Bob to decrypt the data and still leave Eve in the dark.

– Of course, Bob can’t receive this information via courier, because it can be intercepted as well!

• We wish to exchange our keys via private channel

Page 43: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-43

Key Agreement

• So, they’ll need to communicate securely in private before they can communicate securely without a private channel.

• Alice flips the coin, they both write down the result for later use and keep it secure!

– Now they each have the same secret key– And Bob knows what to do with that key to decode the

message.

Page 44: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-44

What Do We Have Now?

• to encrypt we need a bit and a key

• to decrypt we also need a bit and a key

key

Encx x, if key = heads

flipped x, if key = tailsEnc(x)

Decy = Enc(x)

key

y, if key = headsflipped y, if key = tails

x = Dec(y)

Page 45: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-45

What Do We Have Now?

• to obtain the shared secret key, Alice and Bob meet in advance, in private, and toss a coin

key

Encx x, if key = heads

flipped x, if key = tailsEnc(x)

Decy = Enc(x)

key

y, if key = headsflipped y, if key = tails

x = Dec(y)

Page 46: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-46

More Military Applications

• it’s peace time, everything is just ideal, but who knows what evil lurks tomorrow. . .

• so Alice and Bob take the opportunity to establish a secret key

HQ

Psst…I got tails

tails it is

Page 47: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-47

More Military Applications

• of course a war starts

• Sgt. Alice and Private Bob both know the same secret key (it was tails)

HQ

Page 48: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-48

More Military Applications

• Sgt. Alice decides to attack the vile blue army today

HQ

x = 0

Page 49: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-49

More Military Applications

• Sgt. Alice sends Enc(x, tails) = 1, all according to protocol

HQ

1

x = 0key = tails

Page 50: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-50

More Military Applications

• Maj. Eve sees Enc(x, key) = 1, but she has no clue what that means since she doesn’t know the key

HQ

1

x = 0 ????

Page 51: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-51

Dec(1,tails)=0

So X = 0!

More Military Applications

• Private Bob receives Enc(x, key) = 1

• Bob knows the key (tails), so he can decrypt

• he knows he needs to flip the received bit

HQ1

0

*sigh* Enc(x

)=1

Page 52: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-52

More Military Applications

• Major Eve learned nothing about x even after seeing the courier’s message

HQ

X=0 1 or 0 ?X=0

Page 53: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-53

What Did We Just Make?

• we made an encryption scheme

• it’s a symmetric encryption scheme– Alice and Bob have the same key

– either can send a message with it

• it’s information-theoretically secure– no matter how hard Eve tries, she has no chance of breaking it

Page 54: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-54

A Word of Caution

• even though we can indeed use this to send a bit securely, remember, we can use it only once!

• Why?

Page 55: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-55

Pros And Cons

• pros:– the scheme is information-theoretically secure

– can be easily extended to encrypt multiple bits, again information-theoretically secure

• cons:– for every transmission, we need a fresh key

– to establish a shared secret key, we need a private channel

– the extended scheme uses very long keys

Page 56: 21-1 Internet Safety/Security Issues. 21-2 Problems… World Wide Web: –Snooping: When browsing the internet, your information is passed across many routers.

21-56

Computational Public-Key Cryptography

• The scheme that we’ve created has advantages and disadvantages

– In practice, cryptography tries to achieve a compromise