cs 101 – nov. 20 communication, continued (ch. 15) cryptography –examples error detection local...
TRANSCRIPT
![Page 1: CS 101 – Nov. 20 Communication, continued (Ch. 15) Cryptography –examples Error detection Local Area Networks –Different ways to hook up machines](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/1.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022083009/5697c0141a28abf838ccd8da/html5/thumbnails/10.jpg)
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.
…………………………………………