收藏 分享(赏)

CRYPTOGRAPHY.ppt

上传人:Facebook 文档编号:3138431 上传时间:2018-10-04 格式:PPT 页数:43 大小:117.50KB
下载 相关 举报
CRYPTOGRAPHY.ppt_第1页
第1页 / 共43页
CRYPTOGRAPHY.ppt_第2页
第2页 / 共43页
CRYPTOGRAPHY.ppt_第3页
第3页 / 共43页
CRYPTOGRAPHY.ppt_第4页
第4页 / 共43页
CRYPTOGRAPHY.ppt_第5页
第5页 / 共43页
点击查看更多>>
资源描述

1、CRYPTOGRAPHY,Lecture 2 Tuesday, June 27th,Caesar shift,Plain : abcdefghijklmnopqrstuvwxyz ROT 0 : ABCDEFGHIJKLMNOPQRSTUVWXYZ ROT 1 : BCDEFGHIJKLMNOPQRSTUVWXYZA ROT 2 : CDEFGHIJKLMNOPQRSTUVWXYZAB ROT 3 : DEFGHIJKLMNOPQRSTUVWXYZABC ROT 4 : EFGHIJKLMNOPQRSTUVWXYZABCD ROT 5 : FGHIJKLMNOPQRSTUVWXYZABCDE

2、ROT 6 : GHIJKLMNOPQRSTUVWXYZABCDEF ROT 7 : HIJKLMNOPQRSTUVWXYZABCDEFG ROT 8 : IJKLMNOPQRSTUVWXYZABCDEFGH ROT 9 : JKLMNOPQRSTUVWXYZABCDEFGHI ROT 10 : KLMNOPQRSTUVWXYZABCDEFGHIJ ROT 11 : LMNOPQRSTUVWXYZABCDEFGHIJK ROT 12 : MNOPQRSTUVWXYZABCDEFGHIJKL ROT 13 : NOPQRSTUVWXYZABCDEFGHIJKLM ROT 14 : OPQRSTU

3、VWXYZABCDEFGHIJKLMN ROT 15 : PQRSTUVWXYZABCDEFGHIJKLMNO,Caesar shift,A Caesar shift of 20 (or 6, depending which way you are looking at it) gives: ABCDEFGHIJKLMNOPQRSTUVWXYZ UVWXYZABCDEFGHIJKLMNOPQRST,Caesar shift example,BZDRZQR VHED LTRS AD ZANUD RTROHBHNM,First clue: the apostrophe. The only thin

4、gs that can work are a T or an S. But S would be more common. So lets assume that R in the cipher text means S. This means that every letter is the cipher is shifted over by one. Once the rule is clear, the whole message is easily deciphered.,Caesar shift example,CAESARS WIFE MUST BE ABOVE SUSPICION

5、 BZDRZQR VHED LTRS AD ZANUD RTROHBHNM,Caesar shift clues,To find what the shift is, we sometimes have clues: Apostrophes tell us a lot Words with one letter can only be “A” or “I” The most common words with two letters are OF TO IN IS IT BE BY HE AS ON AT OR AN SO IF NO,Caesar shift problems,LWW RLF

6、W TD OTGTOPO TYEZ ESCPP ALCED ZYP ZQ HSTNS ESP MPWRLP TYSLMTE ESP LBFTELYT LYZESPC ESZDP HSZ TY ESPTC ZHY WLYRFLRP LCP NLWWPO NPWED TY ZFC RLFWD ESP ESTCO LWW ESPDP OTQQPC QCZX PLNS ZESPC TY WLYRFLRP NFDEZXD LYO WLHDHow many double letter combinations can we have? Notice the LWW in the beginning of

7、this text., http:/starbase.trincoll.edu/crypto/ http:/ FACTS (for English),Order Of Frequency Of Single LettersE T A O I N S H R D L U Order Of Frequency Of Digraphsth er on an re he in ed nd ha at en es of or nt ea ti to it st io le is ou ar as de rt ve Order Of Frequency Of Trigraphsthe and tha en

8、t ion tio for nde has nce edt tis oft sth men,HW #2a: Caesar shift problems 3 messages all with the same shift,PMFBP PBKA PBZOBQ JBPPXDBP. QEB XOJV FP LK QEB JLSB QELJXP GBCCBOPLK ABPFDKBA X PRYPQFQRQFLK ZFMEBO,HW #2b: Caesar shift problems,MAX YTNEM, WXTK UKNMNL, EBXL GHM BG HNK LMTKL UNM BG HNKLXE

9、OXL. UHWXUA WR URPH VJGEC GUCTU JKHVE KRJGT KUXGT APKEG DWVQP EGAQW JCXGV JGUJK HVHKI WTGFQ WVVJG YJQNG OGUUC IG DG EQOGU QDXKQ WU.,HW #2c: Caesar shift problems (different shift, and hard: why?).,1. KENKMOC PYBDEXK TEFKD2. MHILYLZAZBHLXBPZXBLMVYABUHLHWWPBZJSHBKPBZJHLJBZKPJABTHYJHUBTLZA,HW #2d: Anal

10、ysis,What makes a Caesar shift cipher easier or harder to break? What techniques did you take advantage of? How would you design a better cipher?,Reading,Read the code book p 14-44 Look online at sites that help decipher Caesar shift ciphers Look around 4. Start thinking about what youd like to do

11、for your final project.,The difference between substitution and transposition is that in: Subtitution: each letter retains its position but changes its identity, Transposition: each letter retains its identity but changes its position.,Example 3,Weakness of Caesar shift,If you figured out the shift,

12、 the whole message quickly unravels. If there are spaces, or punctuation, you can get a “handle” on the message. If the message is long enough, or if you have enough messages with the same shift, you can solve by frequency analysis If all else fails, try all 26 possibilities. This may take a while b

13、y hand, but it is not inherently difficult.,What makes the Caesar cipher so convenient?,The key is easy everyone can decrypt it just by knowing one small bit of information. How do you transmit the key? Maybe you can agree on something in advance, e.g. that every day of the month you shift over by t

14、hat number of days (this has to be modified a little to work), or that the name of the month is the letter that A shifts to . . . Some agreed upon way of shifting. The problem of the key will recur in many of the ciphers we see.,Tips for a more secure code,No spaces No punctuation Foreign language M

15、aybe we can change letters in a way that does not have a “chain reaction” solution? It will still be a mono-alphabetic cipher but each letter can be independently determined.,Mono-alphabetic Substitution Cipher,Allow any permutation of the alphabet Each letter is replaced by a different letter or sy

16、mbol Key = permutation (still need to decide on a key and exchange this information in a secure way). 26! Possibilities What does this mean?,How many possibilities?!,If my alphabet has 3 letters, I have the following ways of arranging it:ABC ACB BCABAC CBA CAB,There are 3 ways of choosing the first

17、letter: either A B or C. Once the first letter is chosen, there are only 2 letters left, they can only be arranged in 2 different ways.,How many possibilities?!,If my alphabet has 4 letters, I have the following ways of arranging it: ABCD BCDA CDBA DABC ABDC BCAD CDAB DACB ACBD BACD CADB DBAC ACDB B

18、ADC CABD DBCA ADBC BDAC CBAD DCAB ADCD BDCA CBDA DCBA,How many possibilities?!,If my alphabet has 4 letters, there are 4 ways of arranging the first letter For each of those choices there are only 3 ways to arrange the remaining 3 letters For any given arrangement of the first 2 letters, there are 2

19、 ways of arranging the next 2 letters For any given arrangement of the first 3 letters, theres only one way to pick the last letter. So there are 4*3*2*1 possibilities. This is called 4! = 4*3*2*1=24,How many possibilities?!,If my alphabet has 5 letters, how many possibilities do we have? 5! = 5*4*3

20、*2*1 = 120 lets not write them out . . . If my alphabet has 26 letters, we have 26! = 26*25*24*23* . . . *3*2*1 possibilities.,Mono-alphabetic Substitution Cipher,26! = 403,291,461,126,605,635,584,000,000 For encryption, one of these is not good (the abcdefg one) so we have one less possibility. Eve

21、n if 26 of this are bad (the ones that correspond to the Caesar ciphers) that still leaves lots of good possibilities. Roughly 288: checking 1 billion per second, would take 12 billion years,Mono-alphabetic Substitution Cipher,Too many possibilities to break by brute force! This is a major strength

22、of the substitution cipher. But how will the recipient break it? You need to exchange a key, and it needs to be a key that one can remember.,Mono-alphabetic Substitution Cipher,Is there a better way to break it? al-Kindi, ninth century: frequency analysis Not a recipe, but a good set of guidelines.

23、This only works for longer messages . . .,Frequency Analysis,H EKGGLHQNL KZEL AKGB PL ARHAARL CKSGB CHV XNGG KX UHBVLENSTAF VFVALPV CSTAALZ UF OLKOGL CRK SLHB HOOGTLBESFOAKQSHORF.- USNEL VERZLTLS, VLESLAV HZB GTLV,Example 1,E E E T E T T H EKGGLHQNL KZEL AKGB PL ARHA T E ARL CKSGB CHV XNGG KX UHBE T

24、 TE TTE VLENSTAF VFVALPV CSTAALZ UF E E E E OLKOGL CRK SLHB HOOGTLBT ESFOAKQSHORF.E E E E ET E- USNEL VERZLTLS, VLESLAV HZB GTLV,L occurs 18 times, A occurs 10 times.,Example 1,E E E T E TH T H EKGGLHQNL KZEL AKGB PL ARHA THE ARL CKSGB CHV XNGG KX UHBE T TE TTE VLENSTAF VFVALPV CSTAALZ UF E E H E E

25、OLKOGL CRK SLHB HOOGTLBT H ESFOAKQSHORF.E H E E E ET E- USNEL VERZLTLS, VLESLAV HZB GTLV,Example 1,A EA E E T E THAT H EKGGLHQNL KZEL AKGB PL ARHA THE A A ARL CKSGB CHV XNGG KX UHBE T TE TTE VLENSTAF VFVALPV CSTAALZ UF E E H EA A E OLKOGL CRK SLHB HOOGTLBT A H ESFOAKQSHORF.E H E E E ET A E- USNEL VE

26、RZLTLS, VLESLAV HZB GTLV,Example 1,A OLLEA E O E TOL E THAT H EKGGLHQNL KZEL AKGB PL ARHA THE O L A LL O A ARL CKSGB CHV XNGG KX UHB SE T S STE S TTE VLENSTAF VFVALPV CSTAALZ UF PEOPLE HO EA APPL E OLKOGL CRK SLHB HOOGTLBPTO APH ESFOAKQSHORF.E S H E E SE ETS A L ES- USNEL VERZLTLS, VLESLAV HZB GTLV,

27、Example 1,A COLLEAGUE ONCE TOLD ME THAT H EKGGLHQNL KZEL AKGB PL ARHA THE WORLD WAS FULL OF BAD ARL CKSGB CHV XNGG KX UHB SECURITY SYSTEMS WRITTEN BY VLENSTAF VFVALPV CSTAALZ UF PEOPLE WHO READ APPLIED OLKOGL CRK SLHB HOOGTLB CRYPTOGRAPHY. ESFOAKQSHORF.BRUCE SCHNEIER, SECRETS AND LIES- USNEL VERZLTL

28、S, VLESLAV HZB GTLV,Example 1,A harder example,Shorter = less information R occurs 10 times, A occurs 9 times (all others occur 4 or fewer times) Telegraph style; fewer short words,YIRLAZ MRACIRB CR PKORI CRP:MRPPVAMQAY MRLACZRGA, VAYQAVW RA,Example 2,A harder example,E E E E E E YIRLAZ MRACIRB CR P

29、KORI CRP:E E E E MRPPVAMQAY MRLACZRGA, VAYQAVW RA,E doesnt begin any common 2-letter words,Example 2,A harder example,O O O O O O YIRLAZ MRACIRB CR PKORI CRP:O O O O MRPPVAMQAY MRLACZRGA, VAYQAVW RA,A occurs 9 times. What could it be?,Example 2,A harder example,O N ON O O O O YIRLAZ MRACIRB CR PKORI

30、 CRP:O N N O N O N N N ON MRPPVAMQAY MRLACZRGA, VAYQAVW RA,Example 2,A harder example,O N ONT O TO O TO YIRLAZ MRACIRB CR PKORI CRP:O N N O NT O N N N ON MRPPVAMQAY MRLACZRGA, VAYQAVW RA,Example 2,A harder example,G O N ONT O TO O TO YIRLAZ MRACIRB CR PKORI CRP:O N ING O NT O N NGIN ON MRPPVAMQAY MR

31、LACZRGA, VAYQAVW RA,Example 2,A harder example,GROUND CONTROL TO MAJOR TOM: YIRLAZ MRACIRB CR PKORI CRP: COMMENCING COUNTDOWN, ENGINES ON MRPPVAMQAY MRLACZRGA, VAYQAVW RA,Example 2,Not a good candidate for frequency analysis:,FROM ZANIBAR TO ZAMBIA AND ZAIREOZONE ZONES MAKE ZEBRAS RUN MANY ZIGZAGS,E

32、xample 3,The letter Z is the most common here!,HW # 3a: Substitution cipher Hint: use 3,AVWJM VIPMY DPIYI WFJVB IPAVF DMIMB AJJDP KARMV IPMYM VDPDV HQMAV DPMHI TDFLD PKMAR IBQFF AIJDP WPNMB ILIWU IJMBW MWFIK FIIPM QFPMD HFDVP WPNMB IYVAM BIFVA MBMBI VAPNW PNMBI YEFQR HLIAP YDQFB WPNDP EIRYB IWFMV W

33、JTAL LINVA MBMBI LDUID TWKAF LABIL NBIFE LDJIH QMJBI TWNIN APMBI PAKBM LAOIW GDIRA RIWPM MDVFA MIWPN MBILI WUIJM BWMWF IKFII PMQFP MDHFD VPWPN MBIYV AMBIF VAMBM BIVAP NWPNM BIYEF QRHLI APYDQ FBWPN AMBFI VWGIH HLIAP WHFDD OWPNV WMEBI NMBIF AGGLI JFQPW VWYWP NMBIY PIUIF RWNIW JDQPN WPNMB ILIWU IJMBW MWFIK FIIPM QFPIN MDHFD VPWPN MBIYV AMBIF VAMBM BIVAP NWPNM BIYEF QRHLI APYDQ FBWPN BILLD BILLD BILLD BILLD KDDNH YIKDD NHYIK DDNHY IKDDN HYIMB WMJWL LMBIF IAJWP NMBIL IWUIJ MBWMW FIKFI IPMQF PINMD HFDVP WPNMB IYVAM BIFVA MBMBI VAPNW PNMBI YEFQR HLIAP YDQFB WPN,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 中等教育 > 小学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报