Cryptography II
Total Page:16
File Type:pdf, Size:1020Kb
The Josephus Problem Problem Josephus The Cryptography Note 2: Solutions for Activity 1 1 Activity for Solutions 2: Note ThereIntroduction of are 3 differentnumbers varying versions of ofcircles Activity Sheetcontaining each 1, 1, each containingSheet Activity circlesof of versions varying numbersdifferent 3 are of There soldiers. Eachdivided studentclass the shouldwith worksheets, throughactivity onethese of of Aim theseone of activity Workshopthrough sheets,work withshould the classstudent dividedEach soldiers. intoNote: three For groupsa similar so workshop, that all worksheets please refer are to completed.Thiscompleted. workshop are will worksheets introduce all that so students groups to thethree into ‘Cryptography’, Maths Sparks Volume I. basic concepts of Cryptography including EachCryptography activitycircle a sheet isthat the has art identify circles of producing ofstudents 4, 8, help or 16 to and 32 soldierssoldiers ciphers,32 and to decrypting16 help8, 4, studentsof codes circles identify andhas the thatsheet use a circle of activity Each withsolving aare power codes sheets of and 2 has hasactivity a been ‘winningthe of usedrest (or as survivor)aThe method1. of position’ moduloposition’ of 1.arithmetic Thesurvivor) (or rest ofin theCryptography.‘winning a activity has 2 of sheets Students arepower a with madeof secure up of communication are circles betweenworksheets since 5 three and as the early 25. When from as the answers answers willthe also from beWhen provided 25. the and three 5 with worksheets thebetween opportunity arecircles of up to made collated1900 BCE. in aWhilst tableformula). Cryptography asfor shown3 Note below, initially(see a pattern emerge to beginscreatebegins to emerge theirpattern a own (see encrypted Notebelow, 3 shown for messages,as formula).table a in which collated concerned communication and linguistics, they can then give to their classmate to solve. Numberit has become of soldiers an incredibly Who important Stays Alive? areaAlive Stays NumberWho soldiers ofof soldiers Number Alive? WhoStays StaysWho Alivesoldiers of Number of mathematics given its roots in number theory and 4its relevance1 to internet1 security. 16 Learning16 Outcomes 1 1 4 One of the 5most 3 well-known examples3 17 of By the end17 of this3 workshop, students3 5 will be Cryptography6 in5 ancient times was5 the 18 ‘Caesar able to: 18 5 5 6 cipher’ which was first developed by Julius · Describe historical decryption strategies Caesar and7 reportedly 7 used to communicate7 19 19 7 7 7 messages across8 9 the Roman Empire.1 The20 · Explain,20 in their 1 own words, how9 modular8 Caesar cipher9 is11 considered one 3of the 21 most arithmetic21 works. 3 11 9 simplistic forms of encryption, given that it 10 13 5 22 · Encrypt22 and 5 decrypt coded words13 10 using the uses a substitution technique whereby each Caesar, Vigenère and Pigpen ciphers letter is replaced11 15 by another further7 on23 in 23 7 15 11 the alphabet.12 However,17 frequency9 analysis 24 24 9 17 12 can be used13 to decipher19 such codes11 and25 it Materials25 and 11 Resources 19 13 is therefore considered a relatively weak and unreliable method14 ... of encryption.13 This ... being Vigenère... grid, 13 Pigpen cipher, encryption... 14 said, the ‘Vigenère15 1 cipher’, which15 is a variation32 wheels, activity32 15 sheets, computer1 (optional) 15 of Caesar cipher, is a more secure form of Ascommunication indicatedto due is inThis the given table that numbers. above, a keywordeven noneare isof used thepositions winningwinning positionsthe of arenone even numbers.above, table the This in is due toindicated As theto encrypt fact thatalso the allWe message the peopleround. andfirst in the thus even-numberedin eachkilled letterare positionspositions are killed ineven-numbered thein first round.people the Weall alsothat fact the noticehas a different thatWhilst the shift.winningsoldiers. 8 The and position ‘Pigpen4, 2, 1, resetscipher’for 1) to (that is a back is, goesgoes is, back(that to 1) forresets 1, 2, 4, position and 8 soldiers.winning the Whilstthat notice itvisual intuitively in cipher, makespeople replacing2 or 1 sense only letters forare 1 withto there be symbols. thewhen winning It position positionwinning whenthe be there to 1 arefor onlysense 1 or 2 peoplemakes in intuitively it thewas so circle, 2 used of throughoutit maypowers not both be the immediatelyare American8 and 4 Civil clear war, forHowever, 8. 4 oror 4 8. However,for clear 4 and 8 areimmediately bothbe not powersmay it of 2 socircle, the weas wellcan ascheck by the whether Freemasons.Josephus it resetsthe at eachperform we powerWhen of2. 2.of Whenpower we performeach at theresets it Josephus whether check can we elimination true is for 16same (24)The soldiers,position. for example,winning the 1 is againagain is 1 the winningexample, for position.Ssoldiers, The(24) same16 for is true elimination for 32 (25) soldiers and this holds for 2n soldiers. soldiers. W2n ORDfor holds this and soldiers (25) 32 for Cipher A way of making a word or message secret by changing or rearranging the letters in the message. Shift A value, X, which causes the letters to move X number of spaces up or down the alphabet line. 7 MATHS SPARKS VOL III III MATHSVOL SPARKSSPARKS VOL IIIMATHS 417 Cryptography Cryptography: Workshop Outline Suggested Time Activity Description (Total mins) 10 mins Introduction to · Introduce the concept of Cryptography and (00:10) Cryptography outline the history of Cryptography (see Workshop Introduction) · Explain what is meant by the term cipher (see Key Words) 35 mins Activity 1 · Introduce modular arithmetic using the (00:45) example of a clock and the days of the week The Caesar Cipher (see Appendix – Note 1) · Explain the Caesar cipher and demonstrate how to encrypt and decrypt words (see Appendix – Note 2) · Hand out Activity Sheet 1 and an encryption wheel to each student (Appendix – Note 4) · Activity Sheet 1: Students encrypt and decrypt various messages using the Caesar cipher (see Appendix – Note 3) 25 mins Activity 2 · Mention that the Vigenère cipher is a variation (01:10) of the Caesar cipher and explain how it works The Vigenère using an example on the board (see Appendix Cipher – Note 5) · Hand out Activity Sheet 2 and the Vigenère table to each student (see Appendix – Note 8) · Activity Sheet 2: Students encrypt and decrypt various messages using the Vigenère cipher (see Appendix – Note 6) 15 mins Activity 3 · Explain how the Pigpen cipher works (see (01:25) Appendix – Note 7) The Pigpen Cipher · Activity 3: Ask students to encrypt messages using the Pigpen cipher and give it to their partner to solve (see Appendix – Note 9) 15 mins Kahoot Quiz · Activity 4: Students answer questions relating (01:40) to Cryptography using Kahoot (see Sources (Optional) and Additional Resources for the link and Appendix – Note 10 for solutions) 42 MATHS SPARKS VOL III CryptographyThe Josephus Problem Problem Josephus The Note 2: Solutions for Activity 1 1 Activity for Solutions 2: Note There of are 3 differentnumbers varying versions of ofcircles Activity Sheetcontaining each 1, 1, each containingSheet Activity circlesof of versions varying numbersdifferent 3 are of There soldiers.Note 1: EachModulardivided studentclass Arithmeticthe shouldwith worksheets, throughactivity onethese of of theseone activitythrough sheets,work withshould the classstudent dividedEach soldiers. intoModular three arithmetic groups so is that a system all worksheets of counting are where completed. wecompleted. cycle are back to theworksheets startall uponthat so reachinggroups a three into fixed quantity known as the modulus. Once we reach 12 on a clock, for example, we start back at Each1. Therefore, activitycircle a 15:00sheetthat onhas a identify circles clock corresponds ofstudents 4, 8,help 16to and to 323 modulo soldierssoldiers 32 12,and to 16 denoted help8, 4, studentsof 3 mod circles identify 12.has thatsheet a circleactivity Each with aare power sheets of 2 hasactivity a ‘winningthe of rest (or survivor)The 1. of position’position’ of 1. Thesurvivor) (or rest of the‘winning a activity has 2 of sheets arepower a with madeIf we are up workingof are circles with between modworksheets n, 5 three weand replacethe 25. Whenfrom each the of answers answers thethe fromWhen 25. the and three 5 worksheetsbetween arecircles of up made collatednumbers in with a table its formula). remainder asfor shown3 Note when below,(see divided a patternemerge byto n.beginsbegins to emergepattern a (see Notebelow, 3 shown for as formula).table a in collated Number of soldiers Who Stays Alive?Alive Stays NumberWho soldiers ofof soldiers Number Alive? WhoStays StaysWho Alivesoldiers of Number 15 ≡ 12 + 3 ⇒ 15 ≡ 3 mod 12 4 1 1 16 16 1 1 4 27 ≡ 2(12) + 3 ⇒ 27 ≡ 3 mod 12 5 3 3 17 17 3 3 5 35The ≡ same 2(12) idea + 11 applies ⇒ 35 ≡ in 11 Cryptography mod 12 whereby once the letter6 5 Z is reached, we go5 back 18 to A. This 18 5 5 6 will be demonstrated7 7 in the example7 of19 Caesar cipher. 19 7 7 7 8 9 1 20 20 1 9 8 9 11 3 21 21 3 11 9 10 13 5 22 22 5 13 10 Note 2: Caesar11 15 Cipher 7 23 23 7 15 11 The Caesar12 cipher 17 was used by Julius9 Caesar24 for military messages.24 9 This is a very simple17 12 cipher where each13 letter 19 is shifted forward11 by 25 a common number of25 places, 11 known as the19 shift. 13 In the following14 ... example, we want13 to encrypt... the message “Julius... 13 Caesar” using a... shift 14 of 10: 15 1 15 32 32 15 1 15 1. Write down the message to be coded As2. Fillindicatedto indue theis number inThis the table corresponding numbers. above, even noneare to ofthe the letterpositions winning (A =winning positions0 andthe of Z = are25)none even numbers.above, table the This in is due toindicated As the fact thatalso allWe the peopleround.