(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 46011, 1722]*) (*NotebookOutlinePosition[ 47066, 1758]*) (* CellTagsIndexPosition[ 47022, 1754]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell[TextData["RSA"], "Title", Evaluatable->False, AspectRatioFixed->False], Cell[TextData["Stephan Kaufmann"], "Subsubtitle", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["Demonstration of the ", Evaluatable->False, AspectRatioFixed->False], StyleBox["RSA", Evaluatable->False, AspectRatioFixed->False, FontWeight->"Bold"], StyleBox[" public key encryption system.", Evaluatable->False, AspectRatioFixed->False] }], "Special1", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{Cell[TextData["Reference"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{Cell[TextData["Author"], "Subsubsection", Editable->False, Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "Stephan Kaufmann\nInstitute of Mechanics\nSwiss Federal Institute of \ Technology\nETH Zentrum, HG F38.4 \nCH-8092 Zuerich\nSwitzerland\n\ kaufmann@ifm.ethz.ch"], "SmallText", Editable->False, Evaluatable->False, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Copyright Notice"], "Subsubsection", Editable->False, Evaluatable->False, AspectRatioFixed->False], Cell[TextData["Copyright \[Copyright] 1992 by Stephan Kaufmann"], "SmallText", Editable->False, Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "Permission is hereby granted to make copies of\tthis file for any purpose \ other than direct profit,\tor as part of a commercial product, provided this \ copyright notice is left intact.\tSale is prohibited.\n\t\nPermission is \ hereby granted to reproduce part or all of this file provided that the source \ is acknowledged."], "SmallText", Editable->False, Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Version"], "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData["Notebook Version 2.1 (E)"], "SmallText", Evaluatable->False, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Requirements"], "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" Version: 2.0 or higher.", Evaluatable->False, AspectRatioFixed->False] }], "SmallText", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "If[$VersionNumber < 2.0, Print[\n \"This package requires Mathematica \ version 2.0 or higher.\"]]"], "Input", InitializationCell->True, AspectRatioFixed->False]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Discussion"], "Section", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{Cell[TextData["Algebraic Tools"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["The RSA system is based on ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Euler's theorem:", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["\n\nIf ", Evaluatable->False, AspectRatioFixed->True], StyleBox["a", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["m", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" are relatively prime cardinals, then ", Evaluatable->False, AspectRatioFixed->True], StyleBox["a", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["^(", Evaluatable->False, AspectRatioFixed->True], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->True], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["m", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[")) ", Evaluatable->False, AspectRatioFixed->True], StyleBox["\[Congruent]", Evaluatable->False, AspectRatioFixed->True], StyleBox[" 1 (mod ", Evaluatable->False, AspectRatioFixed->True], StyleBox["m", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[").\n\n", Evaluatable->False, AspectRatioFixed->True], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->True], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["m", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[") is Euler's totient function (i.e. the number of cardinals ", Evaluatable->False, AspectRatioFixed->True], StyleBox["k", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" with 0 < ", Evaluatable->False, AspectRatioFixed->True], StyleBox["k", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" \[LessEqual] ", Evaluatable->False, AspectRatioFixed->True], StyleBox["m", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" which are relatively prime to ", Evaluatable->False, AspectRatioFixed->True], StyleBox["m", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[").\n\nFor a prime ", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[", we have: ", Evaluatable->False, AspectRatioFixed->True], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->True], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[") = ", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["-1;\nfor two primes ", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["q", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[": ", Evaluatable->False, AspectRatioFixed->True], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->True], StyleBox["(", Evaluatable->False, AspectRatioFixed->True], StyleBox["p q", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[") = (", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["-1)(", Evaluatable->False, AspectRatioFixed->True], StyleBox["q", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["-1).", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["RSA Encryption"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["The receiver of a message generates two (large) primes ", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and a number ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", which is relatively prime to ", Evaluatable->False, AspectRatioFixed->False], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->False], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" ", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[") = (", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["-1)(", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["-1). He calculates the product ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" = ", Evaluatable->False, AspectRatioFixed->False], StyleBox["p q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and the (multiplicative) inverse ", Evaluatable->False, AspectRatioFixed->False], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" of ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" modulo ", Evaluatable->False, AspectRatioFixed->False], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->False], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["): ", Evaluatable->False, AspectRatioFixed->False], StyleBox["d e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" ", Evaluatable->False, AspectRatioFixed->False], StyleBox["\[Congruent]", Evaluatable->False, AspectRatioFixed->False], StyleBox[" 1 (mod ", Evaluatable->False, AspectRatioFixed->False], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->False], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[")).\n\nThe receiver puts ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" into a public directory; he keeps ", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" secret.\n\nThe sender of a message uses the numbers ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[ " of the receiver. He transforms the message according to a public scheme \ into a cardinal ", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" < ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[ " or a sequence of such numbers. Then, he calculates the encoded message ", Evaluatable->False, AspectRatioFixed->False], StyleBox["c", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[") according to ", Evaluatable->False, AspectRatioFixed->False], StyleBox["c", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[") = ", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["^", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" (mod ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[ "). This number (or the sequence of such numbers) is transmitted.\n\nThe \ receiver reconstructs the message with the calculation\n", Evaluatable->False, AspectRatioFixed->False], StyleBox["c", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[")^", Evaluatable->False, AspectRatioFixed->False], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" = ", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["^(", Evaluatable->False, AspectRatioFixed->False], StyleBox["e d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[") = ", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["^(1+", Evaluatable->False, AspectRatioFixed->False], StyleBox["k ", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->False], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[")) ", Evaluatable->False, AspectRatioFixed->False], StyleBox["\[Congruent]", Evaluatable->False, AspectRatioFixed->False], StyleBox[" ", Evaluatable->False, AspectRatioFixed->False], StyleBox["m", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" (mod ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[ ").\n\nThe safety of the encryption is based on the fact that there are no \ known polynomial-time algorithms for factoring numbers. If ", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" are large enough, their product ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" can not be factored within reasonable time (or, equivalently, ", Evaluatable->False, AspectRatioFixed->False], StyleBox["\[CurlyPhi]", Evaluatable->False, AspectRatioFixed->False], StyleBox["(", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[") calculated).", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Further Restrictions for the Primes"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["For the encryption to be save, the numbers ", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["q", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ " must be chosen large enough (one hundred or more digits). Furthermore, ", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["\[Dash]1 (and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["q", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["\[Dash]1) should have a large prime factor. The number ", Evaluatable->False, AspectRatioFixed->True], StyleBox["e", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" must also be chosen large.", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Literature"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Akritas, A. G.: ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Elements of Computer Algebra with Applications", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ ". Wiley, New York, 1989.\n\nRivest, R. L., A. Shamir and L. Adleman: A \ method for obtaining digital signatures and public key cryptosystems. ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Communications of the ACM", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" ", Evaluatable->False, AspectRatioFixed->True], StyleBox["21", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold"], StyleBox[", 120-126, 1978.", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["The Functions in this Package"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["RSAPrime[", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["digits", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox[" generates prime suitable for RSA with ", Evaluatable->False, AspectRatioFixed->True], StyleBox["digits", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" digits.", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["GenerateE[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" generates a suitable number ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" for two primes ", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[".", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["GenerateD[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" calculates the number ", Evaluatable->False, AspectRatioFixed->False], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" for a given ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" (and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["p", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["q", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[").", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["StringToList[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["text", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" transforms strings into a list of cardinals < ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[".", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["ListToString[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["l", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" transforms a list of cardinals (from ", Evaluatable->False, AspectRatioFixed->False], StyleBox["StringToList", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[") back into the original string.", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["RSAEncodeNumber[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["num", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" encodes a cardinal ", Evaluatable->False, AspectRatioFixed->False], StyleBox["num", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" with ", Evaluatable->False, AspectRatioFixed->False], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[".", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["RSADecodeNumber[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["num", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" decodes a number ", Evaluatable->False, AspectRatioFixed->False], StyleBox["num", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" with ", Evaluatable->False, AspectRatioFixed->False], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->False], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[".", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["RSAEncode[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["text", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["e", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" encodes a string.", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[{ StyleBox["RSADecode[", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["l", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["d", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox["n", Evaluatable->False, AspectRatioFixed->False, FontSlant->"Italic"], StyleBox["]", Evaluatable->False, AspectRatioFixed->False, FontFamily->"Courier"], StyleBox[" decodes a list of cardinals.", Evaluatable->False, AspectRatioFixed->False] }], "Text", Evaluatable->False, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Example"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "The generation of large suitable primes takes some time. It is a good idea \ to do this in the background. We demonstrate the functions with an \ unrealistically small example."], "Text", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{Cell[TextData[{ StyleBox["Generation of the Primes ", Evaluatable->False, AspectRatioFixed->True], StyleBox["p", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Plain", FontSlant->"Italic"], StyleBox[" and ", Evaluatable->False, AspectRatioFixed->True], StyleBox["q", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Plain", FontSlant->"Italic"] }], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["p = RSAPrime[6]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 589607\ \>", "\<\ 589607\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["q = RSAPrime[6]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 109547\ \>", "\<\ 109547\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData[{ StyleBox["Calculation of ", Evaluatable->False, AspectRatioFixed->True], StyleBox["n", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Plain", FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->True], StyleBox["e", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Plain", FontSlant->"Italic"], StyleBox[", ", Evaluatable->False, AspectRatioFixed->True], StyleBox["d", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Plain", FontSlant->"Italic"] }], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["n = p q"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 64589678029\ \>", "\<\ 64589678029\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["e = GenerateE[p, q]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 54685345301\ \>", "\<\ 54685345301\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["d = GenerateD[e, p, q]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 9922696889\ \>", "\<\ 9922696889\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Encryption and Decryption of Cardinals"], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["c = RSAEncodeNumber[123, e, n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 60209221973\ \>", "\<\ 60209221973\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["RSADecodeNumber[c, d, n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ 123\ \>", "\<\ 123\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData[ "Encoding and Decoding of Strings by Lists of Numbers"], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["StringToList[\"This is a message\", n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData[ "\<\ {1416128883, 543781664, 1629515109, 1936941415, 101}\ \>", "\<\ {1416128883, 543781664, 1629515109, 1936941415, 101}\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["ListToString[%]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ \"This is a message\"\ \>", "\<\ This is a message\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Encryption and Decryption of Text"], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["c = RSAEncode[\"A secret message\", e, n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData[ "\<\ {21733230078, 20996652994, 47313853074, 44849761681}\ \>", "\<\ {21733230078, 20996652994, 47313853074, 44849761681}\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["RSADecode[c, d, n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ \"A secret message\"\ \>", "\<\ A secret message\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Using Larger Primes"], "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["The following primes have been generated with ", Evaluatable->False, AspectRatioFixed->True], StyleBox["RSAPrime", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox[".", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData[ "p =\n332715112660848742187755808851902864945816936127916014252\\\n \ 3661652581105578513717982486654235124785151"], "Input", AspectRatioFixed->True], Cell[OutputFormData[ "\<\ 332715112660848742187755808851902864945816936127916014252\\ 3661652581105578513717982486654235124785151\ \>", "\<\ 332715112660848742187755808851902864945816936127916014252\\ 3661652581105578513717982486654235124785151\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData[ "q =\n120791468413759348683463308420511774373133760151037399776\\\n \ 0717454678735342949711476106521763447795837"], "Input", AspectRatioFixed->True], Cell[OutputFormData[ "\<\ 120791468413759348683463308420511774373133760151037399776\\ 0717454678735342949711476106521763447795837\ \>", "\<\ 120791468413759348683463308420511774373133760151037399776\\ 0717454678735342949711476106521763447795837\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["The example is more realistic now."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["n = p q"], "Input", AspectRatioFixed->False], Cell[OutputFormData[ "\<\ 401891470217532940065104481316616645130402743168640538378\\ 4557947079066749393920750016519448141025489082215324429\\ 9510562623137720909064395523671713481439722088131021777\\ 18484985564189828039179137216387\ \>", "\<\ 401891470217532940065104481316616645130402743168640538378\\ 4557947079066749393920750016519448141025489082215324429\\ 9510562623137720909064395523671713481439722088131021777\\ 18484985564189828039179137216387\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["e = GenerateE[p, q]"], "Input", AspectRatioFixed->False], Cell[OutputFormData[ "\<\ 369282795993095667269448336609858197839950909207263021928\\ 6290870272035455164474885744577452105024134133707726128\\ 8515197487260175665351262033637811162177565817757746047\\ 31773530341936494294609261116683\ \>", "\<\ 369282795993095667269448336609858197839950909207263021928\\ 6290870272035455164474885744577452105024134133707726128\\ 8515197487260175665351262033637811162177565817757746047\\ 31773530341936494294609261116683\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["d = GenerateD[e, p, q]"], "Input", AspectRatioFixed->False], Cell[OutputFormData[ "\<\ 791132763846392502132978874709576024437473082257338749948\\ 8346493056567289495160546293149410538112119745333676238\\ 9739928154582515668118569634366608189408997934132615087\\ 2082216195765263172578014635147\ \>", "\<\ 791132763846392502132978874709576024437473082257338749948\\ 8346493056567289495160546293149410538112119745333676238\\ 9739928154582515668118569634366608189408997934132615087\\ 2082216195765263172578014635147\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["c = RSAEncode[\"A secret message\", e, n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData[ "\<\ {33704782580783447850987421761092546802142771073159890219\\ 497043071994531501439588697529467790765204651888400315\\ 655132851784371402579137143233780620867194709178200696\\ 43981727519482126194063577033691391}\ \>", "\<\ {33704782580783447850987421761092546802142771073159890219\\ 497043071994531501439588697529467790765204651888400315\\ 655132851784371402579137143233780620867194709178200696\\ 43981727519482126194063577033691391}\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["RSADecode[c, d, n]"], "Input", AspectRatioFixed->False], Cell[OutputFormData["\<\ \"A secret message\"\ \>", "\<\ A secret message\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]]}, Open]]}, Open]], Cell[CellGroupData[{Cell[TextData["Implementation"], "Section", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{Cell[TextData["Preparation"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData["BeginPackage[\"SKPackages`RSA`\"];"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSAPrime::usage =\n\"RSAPrime[digits] returns a prime suitable for RSA with \ the given number of digits.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->True], Cell[TextData[ "GenerateE::usage =\n\"GenerateE[p, q] generates a random encoding exponent e \ which is relatively prime to (p-1)(q-1).\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[CellGroupData[{Cell[TextData[ "GenerateD::usage =\n\"GenerateD[e, p, q] returns the multiplicative inverse \ of e mod((p-1)(q-1)).\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "General::spell1: \n Possible spelling error: new symbol name \"GenerateD\"\ \n is similar to existing symbol \"GenerateE\"."], "Message", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData[ "StringToList::usage =\n\"StringToList[text, n] converts a given string to \ block of numbers smaller than n.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "ListToString::usage =\n\"ListToString[l] converts a list of numbers \ (resulting from StringToList) to the original text string.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSAEncodeNumber::usage =\n\"RSAEncodeNumber[num, e, n] encodes the given \ number num using RSA with exponent e and modulus n.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSADecodeNumber::usage =\n\"RSADecodeNumber[num, d, n] decodes the given \ number num using RSA with exponent d and modulus n.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSAEncode::usage =\n\"RSAEncode[text, e, n] encodes the given text by \ converting it to a list of numbers and using RSA with exponent e and modulus \ n.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSADecode::usage =\n\"RSADecode[l, d, n] decodes the given list of numbers l \ by using RSA with exponent d and modulus n and converting the result back to \ the original text string.\";"], "Input", PageWidth->PaperWidth, InitializationCell->True, AspectRatioFixed->False], Cell[TextData["Begin[\"`Private`\"];"], "Input", InitializationCell->True, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Good Primes for RSA"], "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "GoodRSAPrimeQ[n_Integer, l_Integer] :=\n PrimeQ[n] &&\n Module[{d = 1, m = \ (n-1)/2},\n While[d <= l && !PrimeQ[m/d], d++];\n d <= l\n ]"], "Input",\ InitializationCell->True, AspectRatioFixed->True], Cell[TextData[ "RSAPrime[digits_Integer] :=\n Module[{l, cand},\n cand = Random[Integer, \ {10^(digits-1), 10^digits-1}];\n l = 10^Floor[Log[10., cand]/30];\n \ If[EvenQ[cand], cand++];\n While[!GoodRSAPrimeQ[cand, l], cand += 2];\n \ cand\n ]"], "Input", InitializationCell->True, AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["RSA with Numbers"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "GenerateE[p_Integer, q_Integer] :=\n Module[{res, n = p q, phi = \ (p-1)(q-1)},\n res = Random[Integer, {p, n}];\n While[GCD[res, phi] != \ 1,\n res = Random[Integer, {p, n}]];\n res\n ]"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "GenerateD[e_Integer, p_Integer, q_Integer] :=\n PowerMod[e, -1, \ (p-1)(q-1)]"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSAEncodeNumber[num_Integer, e_Integer, n_Integer] :=\n PowerMod[num, e, n] \ /; num < n"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSADecodeNumber[num_Integer, d_Integer, n_Integer] :=\n PowerMod[num, d, \ n]"], "Input", InitializationCell->True, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Conversion of Text"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "ConvertString[str_String] :=\n Fold[Plus[256 #1, #2]&, 0, \ ToCharacterCode[str]]"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "StringToList[text_String, n_Integer] :=\n Module[\n { \n \ blockLength = Floor[N[Log[256, n]]],\n strLength = StringLength[text]\n \ }, \n ConvertString /@ Table[StringTake[text, \n {i, \ Min[strLength, i + blockLength - 1]}],\n {i, 1, strLength, blockLength}]\ \n ] /; n > 256"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData["MakeList[0] = {};"], "Input", InitializationCell->True, AspectRatioFixed->True], Cell[TextData[ "MakeList[num_Integer] :=\n Append[MakeList[Quotient[num, 256]], Mod[num, \ 256]]"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "ConvertNumber[num_Integer] := FromCharacterCode /@ MakeList[num]"], "Input", InitializationCell->True, AspectRatioFixed->True], Cell[TextData[ "ListToString[l_List] :=\n StringJoin[ConvertNumber /@ l]"], "Input", InitializationCell->True, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["RSA with Text"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData[ "RSAEncode[text_String, e_Integer, n_Integer] :=\n RSAEncodeNumber[#, e, n]& \ /@\n StringToList[text, n] /; n > 256"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData[ "RSADecode[l_List, d_Integer, n_Integer] :=\n \ ListToString[RSADecodeNumber[#, d, n]& /@ l]"], "Input", InitializationCell->True, AspectRatioFixed->False]}, Open]], Cell[CellGroupData[{Cell[TextData["Finish"], "Subsection", Evaluatable->False, AspectRatioFixed->False], Cell[TextData["End[ ];"], "Input", InitializationCell->True, AspectRatioFixed->False], Cell[TextData["EndPackage[ ];"], "Input", InitializationCell->True, AspectRatioFixed->False]}, Open]]}, Open]]}, Open]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{36, Automatic}, {Automatic, 16}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ AVU/IFiQKFD000000W7D@09ag@0000000O=J`09FV" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 79, 2, 70, "Title", Evaluatable->False], Cell[1813, 55, 98, 2, 70, "Subsubtitle", Evaluatable->False], Cell[1914, 59, 364, 13, 70, "Special1", Evaluatable->False], Cell[CellGroupData[{ Cell[2301, 74, 90, 2, 70, "Subsection", Evaluatable->False], Cell[CellGroupData[{ Cell[2414, 78, 109, 3, 70, "Subsubsection", Evaluatable->False], Cell[2526, 83, 259, 6, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[2817, 91, 119, 3, 70, "Subsubsection", Evaluatable->False], Cell[2939, 96, 146, 3, 70, "SmallText", Evaluatable->False], Cell[3088, 101, 425, 8, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[3545, 111, 91, 2, 70, "Subsubsection", Evaluatable->False], Cell[3639, 115, 104, 2, 70, "SmallText", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[3775, 119, 96, 2, 70, "Subsubsection", Evaluatable->False], Cell[3874, 123, 278, 10, 70, "SmallText", Evaluatable->False], Cell[4155, 135, 182, 4, 70, "Input", InitializationCell->True] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[4378, 141, 88, 2, 70, "Section", Evaluatable->False], Cell[CellGroupData[{ Cell[4489, 145, 96, 2, 70, "Subsection", Evaluatable->False], Cell[4588, 149, 4261, 169, 70, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[8881, 320, 95, 2, 70, "Subsection", Evaluatable->False], Cell[8979, 324, 9297, 360, 70, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[18308, 686, 115, 2, 70, "Subsection", Evaluatable->False], Cell[18426, 690, 1171, 42, 70, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[19629, 734, 90, 2, 70, "Subsection", Evaluatable->False], Cell[19722, 738, 876, 29, 70, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[20630, 769, 109, 2, 70, "Subsection", Evaluatable->False], Cell[20742, 773, 655, 25, 70, "Text", Evaluatable->False], Cell[21400, 800, 1178, 47, 70, "Text", Evaluatable->False], Cell[22581, 849, 1533, 62, 70, "Text", Evaluatable->False], Cell[24117, 913, 853, 33, 70, "Text", Evaluatable->False], Cell[24973, 948, 692, 25, 70, "Text", Evaluatable->False], Cell[25668, 975, 1362, 55, 70, "Text", Evaluatable->False], Cell[27033, 1032, 1360, 55, 70, "Text", Evaluatable->False], Cell[28396, 1089, 849, 34, 70, "Text", Evaluatable->False], Cell[29248, 1125, 857, 34, 70, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[30137, 1161, 88, 2, 70, "Subsection", Evaluatable->False], Cell[30228, 1165, 252, 5, 70, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[30503, 1172, 487, 19, 70, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[31013, 1193, 69, 1, 70, "Input"], Cell[31085, 1196, 114, 6, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[31231, 1204, 69, 1, 70, "Input"], Cell[31303, 1207, 114, 6, 70, "Output", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[31458, 1215, 663, 27, 70, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[32144, 1244, 61, 1, 70, "Input"], Cell[32208, 1247, 124, 6, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[32364, 1255, 73, 1, 70, "Input"], Cell[32440, 1258, 124, 6, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[32596, 1266, 76, 1, 70, "Input"], Cell[32675, 1269, 122, 6, 70, "Output", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[32838, 1277, 121, 2, 70, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[32982, 1281, 84, 1, 70, "Input"], Cell[33069, 1284, 124, 6, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[33225, 1292, 78, 1, 70, "Input"], Cell[33306, 1295, 108, 6, 70, "Output", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[33455, 1303, 136, 3, 70, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[33614, 1308, 92, 1, 70, "Input"], Cell[33709, 1311, 208, 8, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[33949, 1321, 69, 1, 70, "Input"], Cell[34021, 1324, 141, 7, 70, "Output", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[34203, 1333, 116, 2, 70, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[34342, 1337, 95, 1, 70, "Input"], Cell[34440, 1340, 208, 8, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[34680, 1350, 72, 1, 70, "Input"], Cell[34755, 1353, 139, 7, 70, "Output", Evaluatable->False] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[34935, 1362, 102, 2, 70, "Subsubsection", Evaluatable->False], Cell[35040, 1366, 360, 13, 70, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[35423, 1381, 167, 3, 70, "Input"], Cell[35593, 1386, 316, 11, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[35941, 1399, 167, 3, 70, "Input"], Cell[36111, 1404, 316, 11, 70, "Output", Evaluatable->False] }, Closed]], Cell[36439, 1417, 108, 2, 70, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[36570, 1421, 61, 1, 70, "Input"], Cell[36634, 1424, 538, 17, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[37204, 1443, 73, 1, 70, "Input"], Cell[37280, 1446, 538, 17, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[37850, 1465, 76, 1, 70, "Input"], Cell[37929, 1468, 536, 17, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[38497, 1487, 95, 1, 70, "Input"], Cell[38595, 1490, 548, 17, 70, "Output", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[39175, 1509, 72, 1, 70, "Input"], Cell[39250, 1512, 139, 7, 70, "Output", Evaluatable->False] }, Closed]] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[39448, 1521, 92, 2, 70, "Section", Evaluatable->False], Cell[CellGroupData[{ Cell[39563, 1525, 92, 2, 70, "Subsection", Evaluatable->False], Cell[39658, 1529, 116, 2, 70, "Input", InitializationCell->True], Cell[39777, 1533, 215, 5, 70, "Input", InitializationCell->True], Cell[39995, 1540, 230, 5, 70, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[40248, 1547, 210, 5, 70, "Input", InitializationCell->True], Cell[40461, 1554, 207, 4, 70, "Message", Evaluatable->False] }, Closed]], Cell[40680, 1560, 219, 5, 70, "Input", InitializationCell->True], Cell[40902, 1567, 239, 5, 70, "Input", InitializationCell->True], Cell[41144, 1574, 237, 5, 70, "Input", InitializationCell->True], Cell[41384, 1581, 237, 5, 70, "Input", InitializationCell->True], Cell[41624, 1588, 264, 6, 70, "Input", InitializationCell->True], Cell[41891, 1596, 294, 6, 70, "Input", InitializationCell->True], Cell[42188, 1604, 103, 2, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[42323, 1608, 99, 2, 70, "Subsection", Evaluatable->False], Cell[42425, 1612, 230, 5, 70, "Input", InitializationCell->True], Cell[42658, 1619, 326, 6, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[43016, 1627, 97, 2, 70, "Subsection", Evaluatable->False], Cell[43116, 1631, 285, 5, 70, "Input", InitializationCell->True], Cell[43404, 1638, 161, 4, 70, "Input", InitializationCell->True], Cell[43568, 1644, 172, 4, 70, "Input", InitializationCell->True], Cell[43743, 1650, 161, 4, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[43936, 1656, 99, 2, 70, "Subsection", Evaluatable->False], Cell[44038, 1660, 165, 4, 70, "Input", InitializationCell->True], Cell[44206, 1666, 396, 7, 70, "Input", InitializationCell->True], Cell[44605, 1675, 98, 2, 70, "Input", InitializationCell->True], Cell[44706, 1679, 164, 4, 70, "Input", InitializationCell->True], Cell[44873, 1685, 146, 3, 70, "Input", InitializationCell->True], Cell[45022, 1690, 140, 3, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[45194, 1695, 94, 2, 70, "Subsection", Evaluatable->False], Cell[45291, 1699, 202, 4, 70, "Input", InitializationCell->True], Cell[45496, 1705, 175, 4, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[45703, 1711, 87, 2, 70, "Subsection", Evaluatable->False], Cell[45793, 1715, 89, 2, 70, "Input", InitializationCell->True], Cell[45885, 1719, 96, 2, 70, "Input", InitializationCell->True] }, Closed]] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)