Upcoming SlideShare
Loading in …5
×

# Anthony Zanontian - UCSD presentation on Cryptography

494 views

Published on

Anthony Zanontian - class taken on cryptography this is one of the professors slides i found from a few years back

Published in: Education, Technology, Design
0 Comments
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

No Downloads
Views
Total views
494
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Anthony Zanontian - UCSD presentation on Cryptography

1. 1. Cryptography Kevin O’Bryant [email_address] www.math.ucsd.edu/~kobryant Math 187 MWF 4:00 – 4:50 pm www.math.ucsd.edu/~crypto
2. 2. Definitions <ul><li>Plaintext </li></ul><ul><ul><li>The message that Alice wants Bob to read </li></ul></ul><ul><li>Ciphertext </li></ul><ul><ul><li>The message that Alice sends Bob </li></ul></ul><ul><li>Cryptosystem </li></ul><ul><ul><li>The algorithm that Alice uses to turn plaintext into ciphertext. </li></ul></ul><ul><li>Key </li></ul><ul><ul><li>Something Bob and Alice agree on beforehand that customizes the cryptosystem </li></ul></ul>
3. 3. Cryptosystems <ul><li>Two basic types: </li></ul><ul><ul><li>Substitution (replace letters) </li></ul></ul><ul><ul><li>Transposition (rearrange letters) </li></ul></ul><ul><li>Caeser Cipher </li></ul><ul><ul><li>Shift each letter by the same amount </li></ul></ul><ul><ul><li>Key: how much to shift </li></ul></ul><ul><li>Monoalphabetic Substitution </li></ul><ul><ul><li>Replace each letter with some other letter in a one-to-one manner </li></ul></ul><ul><ul><li>Key: the bottom line of </li></ul></ul><ul><li>Plaintext: abcdefghijklmnopqrstuvwxyz </li></ul><ul><li>Ciphertext: QWERTYUIOPASDFGHJKLZXCVBNM </li></ul>
4. 4. Caeser Cipher <ul><li>GZO PN OCZMZAJMZ WMVXZ JPMNZGQZN OJ JPM YPOT, VIY NJ WZVM JPMNZGQZN, OCVO DA OCZ WMDODNC ZHKDMZ VIY DON XJHHJIRZVGOC GVNO AJM V OCJPNVIY TZVMN, HZI RDGG NODGG NVT, 'OCDN RVN OCZDM ADIZNO CJPM.‘ </li></ul><ul><li>Caeser Cipher </li></ul><ul><ul><li>Strengths </li></ul></ul><ul><ul><ul><li>Very Fast </li></ul></ul></ul><ul><ul><ul><li>Easy to remember </li></ul></ul></ul>
5. 5. Cipher Wheels
6. 6. Caeser Cipher <ul><li>GZO PN OCZMZAJMZ WMVXZ JPMNZGQZN OJ JPM YPOT, VIY NJ WZVM JPMNZGQZN, OCVO DA OCZ WMDODNC ZHKDMZ VIY DON XJHHJIRZVGOC GVNO AJM V OCJPNVIY TZVMN, HZI RDGG NODGG NVT, 'OCDN RVN OCZDM ADIZNO CJPM.‘ </li></ul><ul><li>Caeser Cipher </li></ul><ul><ul><li>Strengths </li></ul></ul><ul><ul><ul><li>Very Fast </li></ul></ul></ul><ul><ul><ul><li>Easy to remember </li></ul></ul></ul><ul><ul><li>Weaknesses </li></ul></ul><ul><ul><ul><li>Formatting gives away the house </li></ul></ul></ul><ul><ul><ul><li>Small number of keys: 26 (and one is weak) </li></ul></ul></ul><ul><ul><ul><li>Frequency analysis </li></ul></ul></ul>
7. 7. Strengthening Caeser <ul><li>Fixing the Formatting Weakness </li></ul><ul><ul><li>Strip out punctuation, and put letters in blocks of the same length. </li></ul></ul><ul><ul><li>GZO PN OCZMZAJMZ WMVXZ JPMNZGQZN OJ JPM YPOT, VIY NJ WZVM JPMNZGQZN, OCVO DA OCZ WMDODNC ZHKDMZ VIY DON XJHHJIRZVGOC GVNO AJM V OCJPNVIY TZVMN, HZI RDGG NODGG NVT, 'OCDN RVN OCZDM ADIZNO CJPM.‘ </li></ul></ul><ul><ul><li>becomes </li></ul></ul><ul><ul><li>GZOP NOCZ MZAJ MZWM VXZJ PMNZ GQZN OJJP MYPO TVIY NJWZ VMJP MNZG QZNO CVOD AOCZ WMDO DNCZ HKDM ZVIY DONX JHHJ IRZV GOCG VNOA JMVO CJPN VIYT ZVMN HZIR DGGN ODGG NVTO CDNR VNOC ZDMA DIZN OCJP M </li></ul></ul>
8. 8. Strengthening Caeser <ul><li>Key weakness is fixed by monoalphabetic substitution </li></ul><ul><ul><li>Strengths </li></ul></ul><ul><ul><ul><li>403,291,461,126,605,635,584,000,000 keys </li></ul></ul></ul><ul><ul><ul><li>Fast </li></ul></ul></ul><ul><ul><li>Weaknesses </li></ul></ul><ul><ul><ul><li>How many keys are easy to remember? </li></ul></ul></ul><ul><ul><ul><li>Frequency analysis </li></ul></ul></ul><ul><li>We saw the frequencies of individual letters, but it is also possible---and reasonable---to look at pairs of letters, and triples, etc. More on this in three weeks. </li></ul>
9. 9. Strengthening Caeser <ul><li>Fixing Frequency analysis </li></ul><ul><ul><li>Many ways to make frequency analysis harder: </li></ul></ul><ul><ul><ul><li>send “e” to 3 letters (do you really need z and x?) </li></ul></ul></ul><ul><ul><ul><li>spell poorly (do you really need all those silent letters?) </li></ul></ul></ul><ul><ul><ul><li>send short messages </li></ul></ul></ul><ul><ul><ul><li>use several different keys in one message </li></ul></ul></ul>
10. 10. Vigen è re’s Cryptosystem <ul><li>Let’s encrypt the plaintext </li></ul><ul><li>“ prince is my favorite musician” </li></ul><ul><li>with the keyword “GUITAR”. </li></ul><ul><li>Step 1: strip formatting: </li></ul><ul><li>“ prince ismyfa vorite musici an” </li></ul><ul><li>using blocks the same length as our keyword. </li></ul><ul><li>Step 2: encrypt the first letter of each block with the Caeser-cipher that sends “a” to “G”, the second with that C-c that sends “a” to “U”, the third with that C-c that sends “a” to “I”, the fourth by sending “a” to “T”, fifth by sending “a” to “A”, the sixth by sending “a” to “R”. </li></ul><ul><li>VLQGCV OMURFR BIZBTV SOABCZ GH </li></ul><ul><li>Step 3: reformat into a (possibly) different block length. </li></ul><ul><li>VLQG CVOM URFR BIZB TVSO ABCZ GH </li></ul>
11. 11. Vigen è re’s Cryptosystem <ul><li>Strengths </li></ul><ul><ul><li>Infinite number of keywords </li></ul></ul><ul><ul><li>Scrambles frequencies </li></ul></ul><ul><ul><li>Easy to remember key </li></ul></ul><ul><ul><li>Considered unbreakable in Black chambers for 200 years </li></ul></ul><ul><li>Weaknesses </li></ul><ul><ul><li>Can perform frequency analysis if we know-or guess-the length of the keyword </li></ul></ul>
12. 12. Vigen è re’s Cryptosystem <ul><li>History </li></ul><ul><ul><li>Idea of entertwining two keys came from Leon Battista Alberti around 1465 in Florence </li></ul></ul><ul><ul><li>Developed by </li></ul></ul><ul><ul><ul><li>Johannes Trithemius </li></ul></ul></ul><ul><ul><ul><li>Giovanni Porta </li></ul></ul></ul><ul><ul><ul><li>Blaise de Vigen è re </li></ul></ul></ul>
13. 13. The Alpha and the Omega of Vigen ère’s cryptosystem
14. 14. Vigen è re’s Cryptosystem <ul><li>History </li></ul><ul><ul><li>Idea of entertwining two keys came from Leon Battista Alberti around 1465 in Florence </li></ul></ul><ul><ul><li>Developed by </li></ul></ul><ul><ul><ul><li>Johannes Trithemius </li></ul></ul></ul><ul><ul><ul><li>Giovanni Porta </li></ul></ul></ul><ul><ul><ul><li>Blaise de Vigen è re </li></ul></ul></ul><ul><ul><li>Broken by Charles Babbage </li></ul></ul><ul><ul><li>Publicly broken by Friedrich Kasiski </li></ul></ul>
15. 15. The Vision of Sin <ul><li>Sit thee down, and have no shame, </li></ul><ul><li>Cheek by jowl, and knee by knee: </li></ul><ul><li>What car I for any name? </li></ul><ul><li>What for order or degree? </li></ul><ul><li>Let me screw thee up a peg: </li></ul><ul><li>Let me loose thy tongue with wine: </li></ul><ul><li>Callest thou that thing a leg? </li></ul><ul><li>Which is thinnest? Thine or mine? </li></ul><ul><li>Thou shalt not be saved by works: </li></ul><ul><li>Thou has been a sinner too: </li></ul><ul><li>Ruined trunks on withered forks, </li></ul><ul><li>Empty scarecrows, I and you! </li></ul><ul><li>Fill the cup, and fill the can: </li></ul><ul><li>Have a rouse before the morn: </li></ul><ul><li>Every moment dies a man, </li></ul><ul><li>Every moment one is born. </li></ul>Alfred Tennyson Image taken from http://charon.sfsu.edu/TENNYSON/tennyson.html
16. 16. Babbage to Tennyson <ul><li>[suggested correction to “otherwise beautiful” poem] </li></ul><ul><li>It must be manifest that if this were true, the population of the world would be at a standstill . . . I would suggest that in the next edition of your poem you have it read – “Every moment dies a man, Every moment 1 1 / 16 is born.” The actual figure is so long I cannot get it onto a line, but I believe the figure 1 1 / 16 will be sufficiently accurate for poetry. </li></ul>
17. 17. Transpositions <ul><li>Part of an actual telegram from Union Army General Halleck to General Buell (quoted from Battle Cry of Freedom: The Civil War Era) </li></ul><ul><li>YOU MARCHED THE IS THE ELSEWHERE MOVE OF SURPRISING TWO TIMES HALLECK AS SLOWLY ARMY IN HAS DISTANCE HAVE FOUR LAST MOST IMMOBILITY YOU HERE TOO YOUR BRAGG MONTHS THE </li></ul>HALLECK HAVE YOU DISTANCE THE TIMES FOUR MARCHED HAS MONTHS TWO LAST THE IN BRAGG SURPRISING MOST IS ARMY YOUR OF IMMOBILITY THE SLOWLY TOO MOVE YOU ELSEWHERE AS HERE
18. 18. From Lincoln <ul><li>1863 WOULD RELIEVED MEADE SINCE HAVE THE WITHOUT ME WAS WHO THE SATURDAY HEVY A WAR FIGHTING CORPS KNOW PLEASE THE TO OF AND IMPRESSION TO CAMERON 15 I BE THAT ALL GETTYSBURG GET RIVER TELL WHO COMMANDER IN ON LINCOLN SIGNED OF FOR ONE YOU FIGHT OVER ONLY BATTLE SMITH THE MUCH SIMON WASHINGTON FOR GIVE OF COUCH THE STRIVEN ENEMY ANOTHER IF THE WAS COUNCIL NIGHT </li></ul>Image from http://www.picturehistory.com/
19. 19. Rectangular Transposition <ul><li>Let’s encrypt </li></ul><ul><li>“Out of life’s school of war: What does not destroy me, makes me stronger.” </li></ul><ul><li>with keyword Nietzsche </li></ul><ul><li>The lexicographically first letter in our keyword is c, followed by e, e, h, i, n, s, t, z: </li></ul><ul><li>6 5 2 8 9 7 1 4 3 </li></ul>
20. 20. Rectangular Transposition <ul><li>Step 2: Write the plaintext under the permutation rowwise </li></ul>r v u z x j q r e g n o r t s e m s e k a m e m y o r t s e d t o n s e o d t a h w r a w f o l o o h c s s e f i l f o t u o 3 4 1 7 9 8 2 5 6
21. 21. Rectangular Transposition <ul><li>Step 3: Write down the columns according to the numbers at the top: </li></ul><ul><li>ILTEAOU TCRNYEQ EFOTEGR FODSKNV USASOMR </li></ul><ul><li>OSWERSE LOADMRZ OHWOMSJ FOHTETX </li></ul>r v u z x j q r e g n o r t s e m s e k a m e m y o r t s e d t o n s e o d t a h w r a w f o l o o h c s s e f i l f o t u o 3 4 1 7 9 8 2 5 6
22. 22. Rectangular Transposition <ul><li>Step 4: Break into grams of a different length: </li></ul><ul><li>ILTEAOU TCRNYEQ EFOTEGR FODSKNV USASOMR </li></ul><ul><li>OSWERSE LOADMRZ OHWOMSJ FOHTETX </li></ul><ul><li>becomes </li></ul><ul><li>ILTEA OUTCR NYEQE FOTEG RFODS KNVUS </li></ul><ul><li>ASOMR OSWER SELOA DMRZO HWOMS JFOHT ETX </li></ul>
23. 23. Grades <ul><li>6 out of 7 quizzes (60%) </li></ul><ul><li>Computer Homework (20%) </li></ul><ul><li>Final Exam (or project) (20%) </li></ul>
24. 24. Summary <ul><li>Caeser Sucks </li></ul><ul><li>Monoalphabetic substitution is better </li></ul><ul><li>Vigenère is good </li></ul><ul><li>Transposition is a nice idea, and deserves to be looked at more </li></ul><ul><li>The End </li></ul>