CS 161 Discussion 3
Announcements
HW 2 is out (due Sunday) [Buffer Overflows + Basic Encryption]
Project 1 is due next Tuesday (7/7)
There’s a really good GDB walkthrough on Piazza (see Section Slides).
Come to OH if you need help!
Asymmetric Cryptography
C.I.A.
Confidentiality: E shouldn’t be able to read private data between A/B.
Integrity: E shouldn’t be able to modify messages sent between A/B without them without detection.
Authenticity: A should be able to verify a message originated from B.
Symmetric-Key Encryption
Confidentiality: E shouldn’t be able to read private data between A/B.
Alice encrypts a message with a shared key.
Bob decrypts a message with the same key.
Without the key, Eve has no information about the message.
One-Time Pad
Schema
Cannot reuse keys!
Properties of XOR: x ⊕ 0 = x x ⊕ x = 0 x ⊕ y = y ⊕ x (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)
Block Ciphers
Goal: we want to be able to encrypt messages of arbitrary length.
Solution: break messages up into blocks, and use fixed-length encryption functions (ex: AES) to encrypt each block. Add padding if needed.
Schemes: ECB, CBC, OFB, Counter (Draw these out!)
IND-CPA
Ciphertexts must be indistinguishable under a chosen-plaintext attack!
The attacker can ask the encryption oracle to encrypt/decrypt as many messages/ciphertexts as they’d like.
Discussion Worksheet
Notes
Feel free to email me at shomil@berkeley.edu with any questions about the course or anything else!
My office hours are from 3 PM - 4 PM on T/Th.
See pinned Piazza posts for link to these slides!