10
CS 101 – Nov. 20 Communication, continued (Ch. 15) • Cryptography – examples • Error detection • Local Area Networks – Different ways to hook up machines

CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Embed Size (px)

Citation preview

Page 1: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

CS 101 – Nov. 20

Communication, continued (Ch. 15)

• Cryptography– examples

• Error detection

• Local Area Networks– Different ways to hook up machines

Page 2: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Encryption examples

• Caesar cipher √

• Cryptogram

• One-time Pad & Japanese Naval Codes– Dictionary table– Additive table– Destroy each page as you use it

Page 3: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Breaking codes

• Like solving a cryptogram

• Distribution of letters (‘e’ versus ‘q’)

• Digraphs, trigraphs

• Common words

• Eric Nave’s “Betrayal at Pearl Harbor”

Page 4: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Errors in transmission

• Random flipping of bits

• Prepare by using parity bit– Add 9th bit to each byte– Goal is that each byte has even # of 1’s– Receiver checks each byte

– Doesn’t solve every error!

Page 5: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Local Area Networks

• Sharing resources in a lab– File server– Printer

• Communication based on topology– point-to-point – star – bus (like speaking at dinner table)– ring (need token to send message)

Page 6: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Bus topology

• All machines share the same channel

• All continuously listening

• “Ethernet” protocol (dinner table)– don’t talk when someone else is talking– collisions

• Amplify signal with repeaters

Page 7: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Token ring

• Fast messaging over larger distances

• Logically arranged in loop

• Messaging: Token passed around the ring.– Am I busy?– From– To– message

Page 8: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Token action

• When you receive token:

• Is the message for me?– If so, read and change to ack.– If not, just pass token.

• Do I need token?– Wait until it comes back as not “busy”

Page 9: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Example

• 4 machines: A, B, C, D.

• A has message for C.– When A gets token, writes message for C.– B passes token.– C receives msg, sends ack message to A.– D passes token.– A receives ack, clears token. …

Page 10: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines

Example #2

• We have 4 machines A, B, C, D.• What happens when…

– Token starts at D.– A has a message for C.– C has a message for A.– B has a message for D.

…………………………………………