140 likes | 149 Views
DTTF/NB479: Dszquphsbqiz Day 2. Announcements: Class is cancelled Thurs+Fri while I’m at the SIGCSE conference Assignment 1 is posted, due next Tuesday in class. Use the time to familiarize yourself with the Matlab/Maple/Mathematica tools. You should have subscribed to Angel forums
E N D
DTTF/NB479: Dszquphsbqiz Day 2 • Announcements: • Class is cancelled Thurs+Fri while I’m at the SIGCSE conference • Assignment 1 is posted, due next Tuesday in class. • Use the time to familiarize yourself with the Matlab/Maple/Mathematica tools. • You should have subscribed to Angel forums • Questions? • Roll Call • Today: shift ciphers
Sherlock Holmes, The Adventure of the Dancing Men (1898)Who got it? In a letter: 2 weeks later: 2 mornings later: 3 days later: 4 days later:
Comments • A simple substitution cipher • Used knowledge of linguistics • The letter E. • Used domain knowledge: Elsie • Issue with ____________: • Sherlock masqueraded as Elsie. • Others are confidentiality, integrity, non-repudiation. • There is a problem with original source: • One symbol is used twice (for V and P). • Perhaps needs error-correcting? • Read Section 2.5 in T&W for the solution
Non-secure channels Encryption Key (+1) Decryption Key (-1) Alice plaintext Encrypt CIPHERTEXT Decrypt Bob DSZQUPHSBQIZ cryptography cryptography Eve Trappe and Washington, p. 3
Shift ciphers • Attributed to Julius Caesar • Letters represented as 0-25. • x x + k (mod 26) • Relatively weak cryptosystem. Consider 4 typical attacks to find the decryption key: • Ciphertext only (the discussion forums) • Known plaintext • Chosen plaintext • Chosen ciphertext
Consider dszquphsbqiz dszquphsbqiz etarvqitcrja fubswrjudskb gvctxskvetlc hwduytlwfumd ixevzumxgvne jyfwavnyhwof kzgxbwozixpg lahycxpajyqh mbizdyqbkzri ncjaezrclasj odkbfasdmbtk pelcgbtencul qfmdhcufodvm rgneidvgpewn shofjewhqfxo tipgkfxirgyp ujqhlgyjshzq vkrimhzktiar wlsjnialujbs xmtkojbmvkct ynulpkcnwldu zovmqldoxmev apwnrmepynfw bqxosnfqzogx cryptography 1. Ciphertext only
2. Known plaintext Say I know sample of plaintext and corresponding ciphertext. How long does the sample need to be to find the key?
3. Chosen plaintext Say I have access to the encryption machine and can choose a sample of plaintext to encode. How can I deduce the key? Just encode a. 4. Chosen ciphertext Say I can choose a sample of ciphertext to decode. Just decode A; that gives decryption key; the encryption key is the negative.
Affine ciphers Somewhat stronger since scale, then shift: x ax + b (mod 26) Say y = 5x + 3; x = ‘hellothere’; Then y = ‘mxggv…’
Affine ciphers: x ax + b (mod 26) Consider the 4 attacks: • How many possibilities must we consider in brute force attack?
Restrictions on a Consider y= 2x, y = 4x, or y = 13x The problem is that gcd(a, 26) ~= 1. The function has no inverse.
Finding the decryption key • What’s the inverse of y = 5x + 3? • Remember this is “Integer mod 26 World”.
Affine ciphers: x ax + b (mod 26) • Consider the 4 attacks: • Ciphertext only: • How long is brute force? • Known plaintext • How many characters do we need? • Chosen plaintext • Wow, this is easy. • Chosen ciphertext • Could be even easier!
Assignment 1 • Enjoy using the Maple/Matlab tools! • Have fun reading the posts • Email if you get stuck • See you Monday!