Transcription of 12 Example: Playfair Cipher - EECS at UC Berkeley
{{id}} {{{paragraph}}}
Pairskeyword219playfairkeyword12 Example: PlayfairCipherProgramfileforthis chapter:Thisprojectinvestigatesa cipherthatis ,thereis nota singletranslationofeachletterofthealphab et;thatis,youdon t justdecidethatevery B , howit start, ,I llpicktheword. Nowwritethelettersofthatwordinthefirstsq uaresofa fivebyfivematrix:KEYWORDT henfinishfillinguptheremainingsquaresoft hematrixwiththeremaininglettersofthealph abet,inalphabeticalorder. Sincethereare26lettersandonly25squares,w eassignI andJ YD ON TY OUYI EA ES VK EZjuiceWHY A BIJWHYIYJYWYEK rowkind220 Chapter12 Example: PlayfairCipherKEYWORDABCFGHI JLMNPQSTUVXZ(Actually, whenchoosingthekeyword,besidesmakingsure thatnoletterappearstwiceyoumustmakesuret hatI andJ donotbothappear. Forexample,wouldn t doasa keyword.)To enciphera message,divideit ,thesentence Why, don t you? becomesNow, findeachpairoflettersinthematrixyoumadee arlier.
row 3, column 2. But in the Playfair program, the row and column numbers are going to be very important. If you want to know more about how to break a Playfair cipher, you can see an example in a mystery novel by Dorothy L. Sayers. In this project, I’m less ambitious: the program merely enciphers a message, given the keyword and the cleartext ...
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}