﻿ Alexander Stanoyevitch's Cryptography Web Page
• Chapter 1: An Overview of the Subject
• Chapter 2: Divisibility and Modular Arithmetic
• Chapter 3: The Evolution of Codemaking Until the Computer Era
• Chapter 4: Matrices and the Hill Cryptosystem
• Chapter 5: The Evolution of Codebreaking Until the Computer Era
• Chapter 6: Representation and Arithmetic of Integers in Different Bases
• Chapter 7: Block Cryptosystems and the Data Encryption Standard (DES)
• Chapter 8: Some Number Theory and Algorithms
• Chapter 9: Public Key Cryptography
• Chapter 10: Finite Fields in General, and GF(256) in Particular
• Chapter 11: The Advanced Encryption Standard Protocol (AES)
• Chapter 12: Elliptic Curve Cryptography
• Appendix A: Sets and Basic Counting Principles
• Appendix B: Randomness and Probability
• Appendix C: Solutions to all Exercises for the Reader
• Appendix D: Answers to Selected Exercises
• References
• Index
• To see a more detailed version of the contents click on this link: Detailed TOC
• To see the book's preface click on this link: Preface

The link below brings you to a text file (created with Notepad) that contains the strings of ciphertexts that appear in Exercises and Exercises for the Reader in the first five chapters. From this file, readers can copy and paste ciphertext passages directly into the platform-independent applets (below) or into any other cryptographic programs.Ciphertexts

A very nice set of platform-independent applets has been created by Eric Flior for some of the core programs of Chapters 1-6. The applets were created with java. They should be helpful for readers by allowing them to do deeper investigations and examples without the distraction of lengthy hand computations. Some of the exercises of Chapter 5 should only be done with the applets from that chapter (or using the MATLAB/FreeMat programs that appear further down this page; readers with stronger computer backgrounds may instead write their own programs using the computer implementation suggestions that appear at the end of each chapter). Below is a brief list of the programs that are included for the corresponding chapters.

The chapter names below are links to the corresponding applet pages.

• 1.1: Converting Strings of Digits to/from Vectors
• 1.2: Converting Upper-Case Text to/from Integers
• 1.3: Converting Lower-Case Text to/from Integers
• 1.4: Shift Cipher
• 1.5: Vigenere Cipher
• 1.6: Random Integer Generator
• 2.1: Prime Factorization of Positive Integers
• 2.2: Successive Prime Finder
• 2.3: The Division Algorithm
• 2.4: The Euclidean Algorithm
• 2.5: The Mod Function
• 2.6: The Extended Euclidean Algorithm
• 2.7: Finding Modular Inverses
• 3.1: Affine Cipher Encryption and Decryption
• 3.2: Computing Compositions of Permutations
• 3.3: Computing Inverses of Permutations
• 4.1: Matrix Operations
• 4.2: Matrix Operations for Modular Matrices
• 5.1: Frequency Counts
• 5.3 Ciphertext Partial Substitutions
• 5.4 Modular Frequency Counts
• 5.5 Extracting n-gram Data
• 5.6 Horizontal Shifted Match Counts
• 5.7 Horizontially Shifted Dot Products
• 6.1 Binary / Hexadecimal / Decimal Converter
• 6.2 Base n String Expansions
• 6.3 Base b String Addition
• 6.4 Base b String Subtraction
• 6.5 Base b String Multiplication
• 6.6 Fast Modular Exponentiation

Below are links to download individual programs for an assortment of algorithms and computer exercises from the book. The programs are written in MATLAB, which is a very user-friendly language, and many comments are included. (NOTE: In MATLAB, comments appear after "%" symbols since anything appearing in a line after this symbol is ignored by MATLAB.) More information on how these programs operate and how corresponding programs can be written in any computing platform can be learned by looking at the computer implementation material appearing at the end of each chapter. Some programs below give reference to the computer exerise to which it corresponds.

The cryptography programs below are set up to run on either MATLAB or the free MATLAB clone FreeMat. Any program that has a single link "MATLAB/FreeMat" can be used with either platform (and this is the case for most of the programs). In a few cases some small changes were needed to make the MATLAB program run on FreeMat, and for such programs there are separate links "MATLAB" and "FreeMat" for the corresponding programs. When using FreeMat, a few programs require some auxilliary programs to run; there are only five of these, and a zipped folder containing them all can by downloaded using this link: Auxilliary Programs for FreeMat
The cryptography programs can either be individually downloaded from the inventory list below, or more simply, the following two links will allow you to download a zip file of the entire folder/file configuration for either MATLAB users or FreeMat Users.