Technology Guides for Mathematica, Maxima, and Cryptography Explorer with an Emphasis on Cryptographic Applications

Technology Guides for Mathematica, Maxima, and Cryptography Explorer with an Emphasis on Cryptographic Applications

Technology Guides for Mathematica, Maxima, and Cryptography Explorer With an Emphasis on Cryptographic Applications Dr. Don Spickler Department of Mathematics & Computer Science Henson School of Science and Technology Salisbury University July 26, 2019 About this Document About this Document This document is designed to be a technology supplement for a first course in cryptog- raphy aimed at the third or fourth year undergraduate mathematics major. The packages covered are Mathematica, Maxima, and Cryptography Explorer. It is not intended to be a general reference for Mathematica or Maxima, just a quick guide to calculations found in cryptographic applications. When I first wrote the Cryptography Explorer program, I wanted to create a package that would take most of the tediousness out of classical cryptographic methods while still leaving the decisions up to the user. As the program has grown, I have tried to keep with that philosophy, although there are some additions that probably do too much for the user. I have also never felt that a single software package was good enough for all applications. This is why I have also incorporated both Mathematica and Maxima into these notes. These are computer algebra systems that have much more computational abilities and power than does the Cryptography Explorer program. For classical cryptographic methods, where manipu- lation is more prevalent than calculation, you will probably find the Cryptography Explorer program easier to use. When it comes to modern techniques, where there is more calcula- tion than there is manipulation, a computer algebra system will probably be easier to use. Although you still may find the Cryptography Explorer program helpful in converting text to and from the numeric type input necessary for the modern techniques. Most importantly, learn, experiment, and enjoy. Don Spickler 2015 Cryptography Notes: Technology Guides ii About this Document Mathematica Mathematica is a commercial computer algebra system, the following description was taken from the Wolfram site (http://www.wolfram.com/). For more than 25 years, Mathematica has defined the state of the art in technical computingand provided the principal computation environment for millions of innovators, educators, students, and others around the world. Widely admired for both its technical prowess and elegant ease of use, Math- ematica provides a single integrated, continually expanding system that covers the breadth and depth of technical computingand with Mathematica Online, it is now seamlessly available in the cloud through any web browser, as well as natively on all modern desktop systems. You can purchase Mathematica from the Wolfram site, http://www.wolfram.com/ Maxima Maxima is an open-source computer algebra system, the following description was taken from the Maxima project site at sourceforge (http://maxima.sourceforge.net/). Maxima is a system for the manipulation of symbolic and numerical expressions, including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, sets, lists, vec- tors, matrices and tensors. Maxima yields high precision numerical results by using exact fractions, arbitrary-precision integers and variable-precision floating- point numbers. Maxima can plot functions and data in two and three dimensions. The Maxima source code can be compiled on many systems, including Windows, Linux, and MacOS X. The source code for all systems and precompiled binaries for Windows and Linux are available at the SourceForge file manager. Maxima is a descendant of Macsyma, the legendary computer algebra system developed in the late 1960s at the Massachusetts Institute of Technology. It is the only system based on that effort still publicly available and with an active user community, thanks to its open source nature. Macsyma was revolutionary in its day, and many later systems, such as Maple and Mathematica, were inspired by it. The Maxima branch of Macsyma was maintained by William Schelter from 1982 until he passed away in 2001. In 1998 he obtained permission to release the source code under the GNU General Public License (GPL). It was his efforts and skill which have made the survival of Maxima possible, and we are very grateful to him for volunteering his time and expert knowledge to keep the original DOE Macsyma code alive and well. Since his death, a group of users and developers has formed to bring Maxima to a wider audience. Cryptography Notes: Technology Guides iii About this Document Maxima is updated very frequently, to fix bugs and improve the code and the documentation. We welcome suggestions and contributions from the community of Maxima users. Most discussion is conducted on the Maxima mailing list. You can download Maxima from the Maxima project site at sourceforge, http://maxima.sourceforge.net/ Cryptography Explorer Cryptography Explorer is a tool that I developed for the investigation of cryptography and cryptanalysis. It was written mainly to ease the investigation of classical cryptography methods but it also contains features for modern ciphers as well as tools for investigating integer factorization and discrete logarithm calculations. Cryptography Explorer can be downloaded from my website at, http://facultyfp.salisbury.edu/despickler/personal/ CryptographyExplorer.html Edition July 26, 2019 Publisher Don Spickler Department of Mathematics and Computer Science Salisbury University 1101 Camden Ave. Salisbury, Maryland 21801 USA Copyright © 2015{2019 Don Spickler Licensed to the public under Creative Commons Attribution-NonCommercial 4.0 International License Cryptography Notes: Technology Guides iv Contents 1 Introduction to Mathematica1 1.1 What is Mathematica?..............................1 1.2 The User Interface................................2 1.3 Basic Calculations................................7 1.3.1 Numeric Calculations...........................7 1.3.2 Algebra..................................9 1.3.3 Execution Timing............................. 11 1.4 Defining Functions................................ 12 1.5 Some Discrete Mathematics & Number Theory Commands.......... 14 1.5.1 Modulus.................................. 14 1.5.2 Power Calculations with a Modulus................... 14 1.5.3 Greatest Common Divisor........................ 15 1.5.4 Extended Greatest Common Divisor.................. 15 1.5.5 Least Common Multiple......................... 16 1.5.6 Chinese Remainder Theorem....................... 16 1.5.7 Functions for Primes........................... 17 1.5.8 Jacobi and Legendre Symbols...................... 18 1.5.9 Continued Fractions........................... 19 1.5.10 Solving Equations............................. 22 1.5.11 Factoring................................. 23 1.5.12 Factoring Polynomials.......................... 24 1.5.13 Euler Totient Function.......................... 24 1.5.14 Primitive Roots and Element Orders.................. 25 1.5.15 Discrete Logarithms........................... 26 1.6 Vectors and Matrices............................... 27 1.6.1 Defining a Matrix and a Vector..................... 27 1.6.2 Matrix Arithmetic............................ 31 1.6.3 Matrix Reduction............................. 33 1.6.4 Modular Matrix Operations....................... 34 1.7 Elliptic Curves.................................. 36 1.7.1 Points on an Elliptic Curve....................... 37 1.7.2 Arithmetic on an Elliptic Curve..................... 41 1.8 CryptDSEC.nb.................................. 44 v CONTENTS 1.8.1 CryptDSEC.nb Code........................... 45 2 Introduction to Maxima 48 2.1 What is Maxima?................................. 48 2.2 The User Interface................................ 50 2.3 Basic Calculations................................ 53 2.3.1 Numeric Calculations........................... 53 2.3.2 Algebra.................................. 55 2.3.3 Execution Timing............................. 57 2.4 Defining Functions................................ 57 2.5 Some Discrete Mathematics & Number Theory Commands.......... 61 2.5.1 Modulus.................................. 61 2.5.2 Power Calculations with a Modulus................... 61 2.5.3 Inverse Calculations with a Modulus.................. 62 2.5.4 Greatest Common Divisor........................ 62 2.5.5 Extended Greatest Common Divisor.................. 63 2.5.6 Greatest Common Divisor of Several Numbers............. 63 2.5.7 Least Common Multiple......................... 64 2.5.8 Chinese Remainder Theorem....................... 64 2.5.9 Functions for Primes........................... 64 2.5.10 Jacobi and Legendre Symbols...................... 66 2.5.11 Continued Fractions........................... 67 2.5.12 Solving Equations............................. 70 2.5.13 Modular Square Roots and Cube Roots................. 72 2.5.14 Factoring................................. 73 2.5.15 Factoring Polynomials.......................... 73 2.5.16 Euler Totient Function.......................... 74 2.5.17 Primitive Roots.............................. 74 2.5.18 Discrete Logarithms........................... 75 2.5.19 Order of an Element........................... 76 2.6 Vectors and Matrices............................... 77 2.6.1 Defining a Matrix............................. 77 2.6.2 Matrix Arithmetic............................ 84 2.6.3 Matrix Reduction............................. 86 2.6.4 Modular Matrix Operations....................... 88 2.7 Elliptic Curves.................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    235 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us