(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 28232, 633] NotebookOptionsPosition[ 26446, 569] NotebookOutlinePosition[ 26858, 587] CellTagsIndexPosition[ 26815, 584] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[TextData[{ StyleBox["MAT 331:", FontSize->24], " ", StyleBox["Project 3", FontSize->24] }], "Section", CellChangeTimes->{{3.618884780257655*^9, 3.618884795191327*^9}, { 3.619013741815179*^9, 3.619013742915434*^9}, {3.6190639773624067`*^9, 3.6190639931423893`*^9}, 3.6190640316767807`*^9, {3.620115017220894*^9, 3.620115018260913*^9}, {3.620271183359037*^9, 3.620271185480665*^9}, { 3.625547969910602*^9, 3.625547970053121*^9}}], Cell[CellGroupData[{ Cell[TextData[StyleBox["Project description:", "Subsection"]], "Section", CellChangeTimes->{{3.61895751446417*^9, 3.61895752344552*^9}, { 3.620185321017673*^9, 3.620185321160325*^9}, {3.620275496470414*^9, 3.620275501630445*^9}, {3.620279164310918*^9, 3.620279164805422*^9}}], Cell["\<\ Cryptography has been used for secure communication for thousands of years. \ The modern world simply depends on cryptography; every time you make a mobile \ phone call, make an electronic transaction or an online payment with a credit \ card, or send a secure email, encryption is vital for protecting sensitive \ information. In this project we are interested in the theoretical foundations \ of the asymmetric/symmetric key cryptosystems, and on how they can be \ efficiently used together to make the information exchange more secure. \ \>", "Text", CellChangeTimes->{{3.618958035675892*^9, 3.61895825489732*^9}, { 3.61895828758503*^9, 3.618958309439242*^9}, {3.6190090575312862`*^9, 3.619009060737265*^9}, {3.619009133231318*^9, 3.6190091577092857`*^9}, { 3.619009297082733*^9, 3.619009305010374*^9}, {3.6190531597810783`*^9, 3.619053163786626*^9}, {3.619057974295499*^9, 3.619058008308049*^9}, { 3.619063099075738*^9, 3.619063221510716*^9}, {3.620104581154149*^9, 3.620104624460071*^9}, 3.620104952514773*^9, {3.620105306189464*^9, 3.62010549225408*^9}, {3.620106757254405*^9, 3.620106783973249*^9}, { 3.62010690214373*^9, 3.6201069404389887`*^9}, {3.620107003675831*^9, 3.620107046135168*^9}, {3.6201072140945473`*^9, 3.6201072521827602`*^9}, { 3.620107296382296*^9, 3.620107686022007*^9}, {3.6201087715394707`*^9, 3.620108772193202*^9}, {3.620108906139463*^9, 3.620108911090001*^9}, { 3.620108943078869*^9, 3.620108945423254*^9}, 3.620113287306345*^9, { 3.620113350538128*^9, 3.620113413916574*^9}, {3.620113448356659*^9, 3.620113599560532*^9}, {3.620114665213971*^9, 3.620114736951397*^9}, { 3.6201148474850683`*^9, 3.6201148752584467`*^9}, {3.620114909764741*^9, 3.620114911396558*^9}, {3.6201149523365803`*^9, 3.62011500488629*^9}, { 3.620189964186058*^9, 3.620189986023975*^9}, {3.620190318682701*^9, 3.6201903257366133`*^9}, {3.620190423660921*^9, 3.620190427915267*^9}, { 3.620197347691531*^9, 3.620197365990987*^9}, {3.6201974043855877`*^9, 3.620197406994176*^9}, {3.6202719954290123`*^9, 3.620271996680101*^9}, { 3.620272255839624*^9, 3.620272304959227*^9}, {3.620272367183546*^9, 3.620272377230268*^9}, {3.620272431118443*^9, 3.620272434436957*^9}, { 3.620272515590114*^9, 3.6202725196350317`*^9}, {3.620272624593026*^9, 3.620272640079751*^9}, {3.620272766275238*^9, 3.620272767296754*^9}, { 3.620272813281234*^9, 3.620272834730152*^9}, {3.620272921996311*^9, 3.6202729625233593`*^9}, {3.620273088967372*^9, 3.6202731231558027`*^9}, { 3.620273153176917*^9, 3.620273157862782*^9}, {3.620273193719795*^9, 3.6202732512557907`*^9}, {3.620273416186001*^9, 3.620273418256668*^9}, { 3.620274180406227*^9, 3.620274227030546*^9}, {3.62027443218283*^9, 3.620274467439011*^9}, {3.620275453349742*^9, 3.620275483006337*^9}, { 3.6209528460864153`*^9, 3.620952865759512*^9}, {3.625549355250002*^9, 3.6255493648461027`*^9}, {3.6255497942821617`*^9, 3.625549803176918*^9}, { 3.625550089445578*^9, 3.625550097980178*^9}, {3.6255501546630907`*^9, 3.6255501861781282`*^9}, {3.625550222292593*^9, 3.625550257699051*^9}, { 3.625550301293231*^9, 3.6255503043566637`*^9}, {3.625550360037552*^9, 3.6255504706555223`*^9}, {3.6255506626626177`*^9, 3.625550675914522*^9}, { 3.625551306720634*^9, 3.625551311776745*^9}, {3.625551534549781*^9, 3.6255515887784863`*^9}, {3.625551773666162*^9, 3.625551825654106*^9}, 3.6255532503353*^9, {3.625798514748447*^9, 3.6257985194269114`*^9}, { 3.6258052733426323`*^9, 3.625805280302153*^9}, {3.625805311055087*^9, 3.625805319374742*^9}, {3.625808881585884*^9, 3.625808943647244*^9}, { 3.625808985557395*^9, 3.6258089859241047`*^9}}, TextJustification->1.] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Tasks:", "Subsection"]], "Section", CellChangeTimes->{{3.6188834470493517`*^9, 3.618883458254191*^9}, { 3.6188841737965927`*^9, 3.618884177712782*^9}, {3.6188846295181627`*^9, 3.6188846297983932`*^9}, {3.619056965231044*^9, 3.619056965742797*^9}, { 3.620185345872222*^9, 3.620185347792323*^9}, {3.620275634697048*^9, 3.620275638063816*^9}}], Cell[TextData[{ "Introduction\n", StyleBox["Browse the web and describe some areas of our everyday life for \ which cryptography is essential. Describe the concept of End-to-End \ encryption and Digital Signatures. ", "Text", FontColor->GrayLevel[0]] }], "Subsubsection", CellChangeTimes->{{3.6256829129897842`*^9, 3.625682915637227*^9}, { 3.625684589830494*^9, 3.6256846035017767`*^9}, {3.625776158467021*^9, 3.625776166860114*^9}, {3.6258011513700247`*^9, 3.625801197713277*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Mathematical explanations\n", StyleBox["Describe the mathematics behind the RSA cryptosystem and prove \ Euler\[CloseCurlyQuote]s Theorem. Also describe the mathematics behind \ Friedman\[CloseCurlyQuote]s test (Friedman\[CloseCurlyQuote]s test uses the \ index of coincidence of a ciphertext to calculate a probable keyword length \ for the Vigen\[EGrave]re cipher).", "Text", FontColor->GrayLevel[0]] }], "Subsubsection", CellChangeTimes->{{3.625682927005403*^9, 3.6256829323094053`*^9}, { 3.625776193999052*^9, 3.625776202307626*^9}, {3.657295724198181*^9, 3.657295740249447*^9}, {3.702533265127474*^9, 3.702533301431999*^9}}], Cell[TextData[{ StyleBox["Project overview\n", "Subsubsection"], "In this project we will use a Vigen\[EGrave]re cipher to communicate secret \ information. Our alphabet will be the 26-letter English alphabet, numerically \ represented as integers between 0 and 25. As always, we first need to agree \ on a secret keyword for the Vigen\[EGrave]re cipher (to be used for both \ encoding and decoding). Each letter from the plaintext/ciphertext message \ will be encoded/decoded separately, using the corresponding letter from the \ keyword. \nWe will use RSA to securely exchange the keyword. My RSA scheme \ will the following: \npublic modulus m=", StyleBox[\ "24806468638651562403127646024001496508044471068911261790905169874134924621014\ 41", FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]], " \nand public key e=", StyleBox["17", FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]], "." }], "Text", CellChangeTimes->{{3.620273440483904*^9, 3.6202734436599483`*^9}, { 3.6202737024797993`*^9, 3.620274002206958*^9}, {3.620274040192863*^9, 3.620274040195754*^9}, {3.6202753291045303`*^9, 3.620275367535472*^9}, { 3.620275884759132*^9, 3.620275989623373*^9}, {3.620276021928265*^9, 3.6202760459204493`*^9}, {3.620277460106645*^9, 3.620277482904023*^9}, { 3.6202785983826103`*^9, 3.620278603068809*^9}, {3.620289020739518*^9, 3.620289027106184*^9}, {3.625550688777388*^9, 3.625550757400483*^9}, { 3.625551124976926*^9, 3.6255511312396383`*^9}, {3.625551271721211*^9, 3.6255512891926813`*^9}, {3.6255514961096087`*^9, 3.625551525257042*^9}, { 3.6255522325185423`*^9, 3.625552235734577*^9}, {3.625552768691983*^9, 3.625552818796184*^9}, {3.625681359825345*^9, 3.625681381161427*^9}, { 3.625683055483489*^9, 3.625683058627882*^9}, {3.625684446748426*^9, 3.625684497065033*^9}, {3.625684535193721*^9, 3.6256845649772263`*^9}, { 3.625684638712682*^9, 3.625684754761547*^9}, {3.625776221247316*^9, 3.625776396551059*^9}, {3.625776464981677*^9, 3.625776492687529*^9}, { 3.6257766667338963`*^9, 3.625776668204748*^9}, {3.625776882783641*^9, 3.625776954333104*^9}, {3.625776992931069*^9, 3.6257769963628893`*^9}, { 3.625777043609583*^9, 3.6257771169618692`*^9}, {3.625777377580784*^9, 3.625777378924715*^9}, {3.625802332758102*^9, 3.625802398250511*^9}, { 3.625803088168233*^9, 3.6258031095753403`*^9}, 3.625803144966507*^9, { 3.625803765667611*^9, 3.6258037757156353`*^9}, 3.625803848308354*^9, { 3.6261444939051447`*^9, 3.626144499744228*^9}, {3.626157643511271*^9, 3.626157648075583*^9}, 3.7025331823115263`*^9, {3.702533321295002*^9, 3.702533325477333*^9}, 3.702534241318645*^9}, TextJustification->1., FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell["Part 1 - RSA", "Subsubsection", CellChangeTimes->{{3.62568299039809*^9, 3.625683002427397*^9}, { 3.62577726654666*^9, 3.625777336898054*^9}, {3.625779162603258*^9, 3.625779164571434*^9}, {3.625784853117972*^9, 3.62578505474544*^9}, { 3.625785192714449*^9, 3.6257852024038887`*^9}, 3.625785315832382*^9, { 3.62578608779838*^9, 3.6257860996285686`*^9}, {3.6257907823027573`*^9, 3.625790782845809*^9}, {3.625790862193925*^9, 3.625790862938047*^9}, { 3.625790903181439*^9, 3.625790903748496*^9}, {3.625790950805999*^9, 3.625790959724938*^9}, {3.625797155603166*^9, 3.6257971561544867`*^9}}], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Your first task will be to set up your own RSA scheme. For the \ purpose of this project, we will assume that it is secure enough if you \ choose two prime numbers with exactly 40 (decimal) digits. Submit your public \ RSA information on Blackboard. ", "Text", FontColor->GrayLevel[0]], StyleBox["Note: Send only the public information! ", "Text", FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox["\n", "Text", FontColor->GrayLevel[0]], StyleBox["There are tables of prime numbers available online. You can also \ tell ", "Text", FontColor->GrayLevel[0.5]], StyleBox["Mathematica", "Text", FontSlant->"Italic", FontColor->GrayLevel[0.5]], StyleBox[" to generate a pseudo-random prime number with k digits by using \ the command RandomPrime[10^k]", "Text", FontColor->GrayLevel[0.5]], StyleBox[". ", "Text"], StyleBox["Double check that the number generated is indeed prime by using \ the Boolean function", "Text", FontColor->GrayLevel[0.5]], StyleBox[" ", "Text"], StyleBox["PrimeQ[...].", "Text", FontColor->GrayLevel[0.5]] }], "Item", CellChangeTimes->{{3.625796182862109*^9, 3.625796204398045*^9}, { 3.625797250985471*^9, 3.625797253521885*^9}, {3.625797328631748*^9, 3.625797331031789*^9}, {3.6257979809585543`*^9, 3.62579799012152*^9}, { 3.626157698151236*^9, 3.626157864193466*^9}, {3.657295881585804*^9, 3.65729588269862*^9}}, TextJustification->1.], Cell["\<\ After you complete the first step, you will receive message-signature pairs \ encoded with your RSA public information. Eve is also trying to get access to \ our private communications, so she will also try to send you fake Vigen\ \[EGrave]re keywords encoded with your RSA public key. You will decode the \ message-signature pairs, and keep only the information for which the \ signature is valid, and discard the rest. \ \>", "Item", CellChangeTimes->{{3.625796182862109*^9, 3.625796261289057*^9}, { 3.625796311366457*^9, 3.625796394367854*^9}, {3.625797176202523*^9, 3.625797178082655*^9}, {3.625797288775815*^9, 3.6257973150920267`*^9}, 3.702533331287137*^9}, TextJustification->1.], Cell["\<\ The decoded message with valid digital signature will be an integer x between \ 1 and your RSA modulus. You will take this integer x and convert it to base \ 26. This will be our keyword for the Vigen\[EGrave]re cipher.\ \>", "Item", CellChangeTimes->{{3.625796182862109*^9, 3.625796261289057*^9}, { 3.625796311366457*^9, 3.625796464778137*^9}, {3.625797068526951*^9, 3.625797071359256*^9}, {3.625798013893106*^9, 3.6257982083124037`*^9}, { 3.625798446871068*^9, 3.625798447397653*^9}, {3.625800152204646*^9, 3.6258001618353043`*^9}, 3.702533334044835*^9}, TextJustification->1.], Cell[TextData[{ StyleBox["For example, if the decoded message is x=190, then its base 26 \ representation is ", FontColor->GrayLevel[0.5]], Cell[BoxData[ FormBox[ FrameBox["7"], TraditionalForm]], FontColor->GrayLevel[0.5]], Cell[BoxData[ FormBox[ FrameBox["8"], TraditionalForm]], FontColor->GrayLevel[0.5]], StyleBox[", which corresponds to the English word \[OpenCurlyDoubleQuote]HI\ \[CloseCurlyDoubleQuote].", FontColor->GrayLevel[0.5]] }], "ItemParagraph", CellChangeTimes->{{3.625796182862109*^9, 3.625796261289057*^9}, { 3.625796311366457*^9, 3.625796464778137*^9}, {3.625797068526951*^9, 3.625797071359256*^9}, {3.625798013893106*^9, 3.625798255175742*^9}, { 3.625798326547051*^9, 3.625798376655388*^9}, {3.625798409038825*^9, 3.625798416574626*^9}, {3.657295178427691*^9, 3.65729518123398*^9}}, TextJustification->1.] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Part 2 - Vigen\[EGrave]re", "Subsubsection", CellChangeTimes->{{3.625683016915357*^9, 3.625683025931396*^9}, 3.70253333795505*^9}], Cell[CellGroupData[{ Cell[TextData[{ "Build an interactive model in ", StyleBox["Mathematica", FontSlant->"Italic"], " for encoding/decoding English text messages that have been encrypted using \ a Vigenere cipher with keyword k. Your model should have a textbox s, in \ which the text to be encoded/decoded can be written, and a textbox k for the \ keyword. By default, these boxes should be populated with the encrypted text \ below, and respectively with the key that you have obtained after the RSA \ decoding process. For these default settings, the model should output the \ decoded text. " }], "Item", CellChangeTimes->{{3.620273440483904*^9, 3.6202734436599483`*^9}, { 3.6202737024797993`*^9, 3.620274002206958*^9}, {3.620274040192863*^9, 3.620274053329183*^9}, {3.620274860937676*^9, 3.620274926637228*^9}, { 3.6202749851904182`*^9, 3.6202749878384113`*^9}, {3.620275794800355*^9, 3.620275862654866*^9}, {3.6202760659606743`*^9, 3.620276067528509*^9}, { 3.62555224482253*^9, 3.625552532568769*^9}, {3.625682169650751*^9, 3.625682214079114*^9}, {3.625682253504236*^9, 3.625682253506712*^9}, { 3.6256842789317837`*^9, 3.62568428038619*^9}, {3.625798552802394*^9, 3.6257985689088097`*^9}, {3.625798632194614*^9, 3.625798644737961*^9}, { 3.62579882541975*^9, 3.625798878030168*^9}, {3.625798922105544*^9, 3.625798944193754*^9}, {3.65729527163273*^9, 3.657295289814651*^9}, { 3.657295328721017*^9, 3.657295345978215*^9}, 3.702534298974267*^9}, TextJustification->1., FontSize->14], Cell[TextData[{ StyleBox["s=\[OpenCurlyDoubleQuote]", FontWeight->"Bold"], StyleBox["KLIQEJXUULFYTECJXFRPKLOVCNLOPYBITKCSISWMLXOIRYIWDWKLIQEJXUULFYT", FontWeight->"Bold", Background->RGBColor[1, 0.9, 1]], StyleBox["\[CloseCurlyDoubleQuote]", FontWeight->"Bold"] }], "ItemParagraph", CellChangeTimes->{ 3.625801024383232*^9, {3.625932128512011*^9, 3.625932134268765*^9}, { 3.62593230014242*^9, 3.625932317013681*^9}}], Cell[TextData[{ "Add some extra functionality to your model from part 2. We know that the \ Vigen\[EGrave]re cipher is vulnerable to statistical analysis, so you will \ now try to make your model work even if no key is provided. If the keyword \ box is empty, then you will compute the index of coincidence of the \ ciphertext and use Friedman\[CloseCurlyQuote]s test to guess the probable \ keyword length. Remember that you need to have a reasonably long chunk of \ encrypted text for statistical analysis to work; also recall that Friedman\ \[CloseCurlyQuote]s test is not very accurate so it is usually used in \ combination with other tests (if you get 7.2 by Friedman\[CloseCurlyQuote]s \ test, then the keyword could easily have length 6, 7 or 8). The keyword \ length tells you how many Caesar ciphers were used, so you can now proceed \ and break each of them by using ", StyleBox["letter frequency analysis", FontWeight->"Bold", FontSlant->"Italic"], " (or in the worst case scenario, by brute-force approach). " }], "Item", CellChangeTimes->{ 3.625799312968055*^9, {3.6257993784054613`*^9, 3.625799411124961*^9}, { 3.625799561736293*^9, 3.625799633048164*^9}, {3.62579966430869*^9, 3.625799900472198*^9}, {3.625800890637805*^9, 3.625800951844144*^9}, { 3.6258065401629753`*^9, 3.625806555187024*^9}, {3.625806592110305*^9, 3.625806625038954*^9}, {3.6258071090900497`*^9, 3.625807235752182*^9}, { 3.62593235530313*^9, 3.625932356078012*^9}, {3.6261583759442463`*^9, 3.626158506454262*^9}, {3.6261585854257593`*^9, 3.626158589025374*^9}, 3.702533350440263*^9}, TextJustification->1.], Cell[TextData[{ "Your model should output the index of coincidence of the ciphertext and the \ decoded message (or ", StyleBox["a", FontWeight->"Bold", FontSlant->"Italic"], " ", StyleBox["very short", FontWeight->"Bold", FontSlant->"Italic"], " ", StyleBox["list", FontWeight->"Bold", FontSlant->"Italic"], " with attempted decodings, including the correct one). Do not output \ thousands and thousands of attempted decodings! If you want to print other \ relevant information (like the probable keyword length), please feel free to \ do so. " }], "ItemParagraph", CellChangeTimes->{ 3.625799312968055*^9, {3.6257993784054613`*^9, 3.625799411124961*^9}, { 3.625799561736293*^9, 3.625799633048164*^9}, {3.62579966430869*^9, 3.625799900472198*^9}, {3.625800890637805*^9, 3.625800932947974*^9}, { 3.625800987149168*^9, 3.625800996124251*^9}, {3.625805947173167*^9, 3.625805947175132*^9}, {3.657295229657152*^9, 3.657295235670186*^9}, { 3.65729536546161*^9, 3.6572954143095427`*^9}, {3.65729544583988*^9, 3.657295657922895*^9}}, TextJustification->1.], Cell["", "ItemParagraph", CellChangeTimes->{ 3.625799312968055*^9, {3.6257993784054613`*^9, 3.625799411124961*^9}, { 3.625799561736293*^9, 3.625799633048164*^9}, {3.62579966430869*^9, 3.625799900472198*^9}, {3.625800890637805*^9, 3.625800932947974*^9}, { 3.625800987149168*^9, 3.625800996124251*^9}, 3.625805947173167*^9}, TextJustification->1.], Cell[TextData[{ StyleBox["s=", FontSize->14], "\[CloseCurlyDoubleQuote]", StyleBox[\ "DLCZVMDIADMMXSDCILCMRSZCSRDYVKKXGYRYQEGXWRERYEXFYVGJIBKGAOWQYVDBESNYJORRMLYXK\ CCLYCFCORMPTPSQCMSLMIPXXFBSSQLMEXRRIAORREVGOWKYHCBRAYQKERGMERSSLDIARRGAYCCYQSR\ EMSKZYROVQMSLXIADIBDLPYYERRCDAMBOQWEIOEJVHYDECFILWSPOZSVRCBEZVIDYVRRIQOXFBIYDW\ YVWMXIUSWQEIQRETOGMWISZXFKXUOVCXSRBIJOZYXXZOJMBIFYARYEBNEBSKGDEJCMEXEREVCDSYXI\ JOGRBSLSGBYGSWILDMLCYAREUKCRRERDLCCMEXIPMELXSRNILIPYDIPYRRRERDLCNSAEQCXXUKWQSK\ LOHZILGWLCB", FontWeight->"Bold", Background->RGBColor[1, 0.9, 1]], "\[CloseCurlyDoubleQuote]." }], "ItemParagraph", CellChangeTimes->{{3.6258058836201887`*^9, 3.62580589845166*^9}, { 3.62580817991905*^9, 3.6258081799217863`*^9}}, FontSize->12], Cell[TextData[{ StyleBox["s=", FontSize->14], "\[CloseCurlyDoubleQuote]", StyleBox[\ "AFUXMCKRJTIEXBCRJNTTCWFCLEMMDCTERARRMYCLPQMVKBJQXTSKVMGKFXTMGKPTIWUPQBDNEPAHL\ LMZLZKFXCCMKCKWPXHSXEABVQBERAVABGFXIRXORTEBVFKIRPBEEMYCLVUBKFMYCEVRMVPYICJLCGT\ GXJMYKFXVLZCGLYYEGFTSCMFLXMCKPONZADCWYZLWJRAVGFREXJSGUCKKFXGCKDSMRRBFLIFDMYCFF\ QMWPXHSXEREVRMVPLZLMYCICYBERXOR", FontWeight->"Bold", Background->RGBColor[1, 0.9, 1]], "\[CloseCurlyDoubleQuote]." }], "ItemParagraph", CellChangeTimes->{{3.6258058836201887`*^9, 3.62580589845166*^9}, { 3.62580817991905*^9, 3.625808188764956*^9}}, FontSize->12] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Part 3 - RSA Common Modulus Problem", "Subsubsection", CellChangeTimes->{{3.6258025182356443`*^9, 3.625802537171973*^9}, { 3.62580284862502*^9, 3.625802850001013*^9}, {3.625804771306385*^9, 3.625804772009149*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Does it work to break the RSA modulus m=", StyleBox[\ "24806468638651562403127646024001496508044471068911261790905169874134924621014\ 41", FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]], " by a brute force approach? How long does it take?" }], "Item", CellChangeTimes->{{3.625802883985133*^9, 3.62580294177805*^9}, 3.625803256544587*^9, 3.6258090073271008`*^9, {3.626157678094955*^9, 3.626157685663102*^9}, 3.626158292800352*^9, {3.6572964933768473`*^9, 3.6572964933788033`*^9}}], Cell[TextData[{ "In this part, we will explore a vulnerability of the RSA system, known as \ the common modulus problem. Suppose that Alice and Kate use the same RSA \ modulus m as above, but with different encryption exponents ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["e", "Alice"], "=", "17"}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["e", "Kate"], "=", "169"}], TraditionalForm]]], ". Bob wants to send the message x to both Alice and Kate. He first encrypts \ x using Kate\[CloseCurlyQuote]s public exponent, and sends Kate the \ ciphertext ", StyleBox[\ "24908150844471945688176978920656941995702651953455119461925101697285851164749\ 3", FontWeight->"Bold", Background->RGBColor[0.88, 1, 0.88]], StyleBox[".", FontWeight->"Bold"], " Then he encrypts x using Alice\[CloseCurlyQuote]s public exponent and \ sends the ciphertext ", StyleBox["548038685778480218593900000000000000000", FontWeight->"Bold", Background->RGBColor[0.88, 1, 0.88]], " to Alice.", StyleBox[" ", FontWeight->"Bold"], "If Eve intercepts both of the ciphertexts, explain how she can recover the \ plaintext ", StyleBox["without knowing either decryption exponent", FontSlant->"Italic"], ", then apply her method to find x." }], "Item", CellChangeTimes->{{3.625802578087397*^9, 3.625802752743679*^9}, { 3.6258028016212587`*^9, 3.625802830565938*^9}, {3.625803572302699*^9, 3.625803582093192*^9}, {3.625803613946575*^9, 3.62580365245608*^9}, { 3.625803689892064*^9, 3.625803700314044*^9}, {3.625803784782279*^9, 3.62580378478233*^9}, {3.625803842335372*^9, 3.6258038423353987`*^9}, { 3.625804303361747*^9, 3.625804305768383*^9}, {3.625804386128089*^9, 3.625804438835103*^9}, {3.625804470389965*^9, 3.625804475525303*^9}, { 3.625809034261607*^9, 3.625809034604464*^9}, {3.626158103123891*^9, 3.626158149948814*^9}, {3.65729671834044*^9, 3.657296731811056*^9}, { 3.657296775338336*^9, 3.657296810175879*^9}, 3.702533210832076*^9}, TextJustification->1.] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Conclusions and references", "Subsection"]], "Section", CellChangeTimes->{{3.6188834470493517`*^9, 3.618883458254191*^9}, { 3.6188841737965927`*^9, 3.618884177712782*^9}, {3.6188846295181627`*^9, 3.6188846297983932`*^9}, {3.619056965231044*^9, 3.619056965742797*^9}, { 3.620185345872222*^9, 3.620185347792323*^9}, {3.620275634697048*^9, 3.620275638063816*^9}, {3.62580918044382*^9, 3.625809201874515*^9}}], Cell[CellGroupData[{ Cell["\<\ Give some brief instructions on how your model should be tested (how to use \ the controls, what functionalities you have implemented, etc.).\ \>", "Item", CellChangeTimes->{{3.620273440483904*^9, 3.6202734436599483`*^9}, { 3.6202737024797993`*^9, 3.620274024316057*^9}, {3.620274061800963*^9, 3.620274082225349*^9}, {3.620274339132412*^9, 3.620274379121662*^9}, { 3.620274514088357*^9, 3.620274534270507*^9}, {3.620276170532715*^9, 3.620276273792305*^9}, {3.620276304110758*^9, 3.620276319115917*^9}, { 3.620276371807721*^9, 3.6202765942195473`*^9}, {3.6202768687132387`*^9, 3.620276868716264*^9}, {3.620277227143683*^9, 3.62027724734381*^9}, { 3.620277282907153*^9, 3.6202772929955893`*^9}, {3.620277329937893*^9, 3.620277369415407*^9}, {3.620277567016253*^9, 3.620277569264638*^9}, { 3.620278229020762*^9, 3.620278302791202*^9}, {3.620278641996458*^9, 3.6202786435161858`*^9}, {3.6572957866679907`*^9, 3.657295797886265*^9}}, TextJustification->1., FontSize->14], Cell["\<\ Formulate your conclusions after testing your interactive model. Is the index \ of coincidence an accurate estimate for the length of the key? How secure is \ our communication protocol? How secure is RSA?\ \>", "Item", CellChangeTimes->{{3.620273440483904*^9, 3.6202734436599483`*^9}, { 3.6202737024797993`*^9, 3.620274024316057*^9}, {3.620274061800963*^9, 3.620274082225349*^9}, {3.620274339132412*^9, 3.620274379121662*^9}, { 3.620274514088357*^9, 3.620274534270507*^9}, {3.620276170532715*^9, 3.620276273792305*^9}, {3.620276304110758*^9, 3.620276319115917*^9}, { 3.620276371807721*^9, 3.6202765942195473`*^9}, {3.6202768687132387`*^9, 3.620276888906393*^9}, {3.620276922543928*^9, 3.6202771665980263`*^9}, { 3.620278162943123*^9, 3.620278186045005*^9}, {3.620880549284628*^9, 3.6208805513561707`*^9}, {3.625800021051902*^9, 3.6258001129636393`*^9}, { 3.6258087514094276`*^9, 3.625808773416698*^9}}, TextJustification->1., FontSize->14], Cell["Don\[CloseCurlyQuote]t forget to include all relevant references.", \ "Item", CellChangeTimes->{{3.620273440483904*^9, 3.6202734436599483`*^9}, { 3.6202737024797993`*^9, 3.620274024316057*^9}, {3.620274061800963*^9, 3.620274082225349*^9}, {3.620274339132412*^9, 3.620274379121662*^9}, { 3.620274514088357*^9, 3.620274534270507*^9}, {3.620276170532715*^9, 3.620276273792305*^9}, {3.620276304110758*^9, 3.620276319115917*^9}, { 3.620276371807721*^9, 3.6202765942195473`*^9}, {3.6202768687132387`*^9, 3.620276917840207*^9}, {3.620277175221816*^9, 3.620277180173583*^9}, { 3.620277533241397*^9, 3.620277534112125*^9}, {3.620880534708021*^9, 3.620880537012148*^9}, {3.6258090803763723`*^9, 3.6258091008645277`*^9}}, TextJustification->1., FontSize->14] }, Open ]] }, Open ]] }, WindowSize->{1280, 682}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (September \ 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 454, 11, 64, "Section"], Cell[CellGroupData[{ Cell[1037, 35, 281, 3, 41, "Section"], Cell[1321, 40, 3743, 52, 68, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[5101, 97, 375, 5, 55, "Section"], Cell[5479, 104, 491, 9, 54, "Subsubsection"], Cell[CellGroupData[{ Cell[5995, 117, 656, 11, 67, "Subsubsection"], Cell[6654, 130, 2716, 46, 151, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[9407, 181, 617, 8, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[10049, 193, 1431, 33, 85, "Item"], Cell[11483, 228, 709, 12, 62, "Item"], Cell[12195, 242, 606, 10, 45, "Item"], Cell[12804, 254, 861, 21, 33, "ItemParagraph"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[13714, 281, 141, 2, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[13880, 287, 1509, 25, 62, "Item"], Cell[15392, 314, 433, 11, 21, "ItemParagraph"], Cell[15828, 327, 1629, 27, 96, "Item"], Cell[17460, 356, 1092, 27, 38, "ItemParagraph"], Cell[18555, 385, 359, 6, 21, "ItemParagraph"], Cell[18917, 393, 743, 17, 51, "ItemParagraph"], Cell[19663, 412, 601, 15, 36, "ItemParagraph"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[20313, 433, 225, 3, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[20563, 440, 523, 12, 45, "Item"], Cell[21089, 454, 2043, 47, 98, "Item"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[23193, 508, 440, 5, 55, "Section"], Cell[CellGroupData[{ Cell[23658, 517, 1003, 16, 30, "Item"], Cell[24664, 535, 975, 16, 45, "Item"], Cell[25642, 553, 776, 12, 30, "Item"] }, Open ]] }, Open ]] } ] *)