The Laws of Cryptography:
List of Java Programs

by Neal R. Wagner

Copyright © 2001 by Neal R. Wagner. All rights reserved.

NOTE: This site is obsolete. See book draft (in PDF):


Part I: Preliminaries

  1. Cryptographers' Favorites
    1. Demonstration of Xor
    2. Formulas for logs
    3. Fermat's Theorem Illustrated
  2. Cryptographers' Favorite Algorithms
    1. Basic GCD Algorithm
    2. Extended GCD Algorithm
    3. Extended GCD Algorithm (debug version)
    4. Testing Two Exponential Algorithms
Part II: Coding and Information Theory

  1. Coding and Information Theory
    1. Formula for Channal Capacity
    2. Table of Channal Capacities
    3. Inverse of the Channal Capacity formula
    4. Table of Repetition Codes
  2. Visualizing Channel Capacity
    1. Simulating Shannon's Random Codes
    2. Graph displaying simulation results: Postscript   PDF   Postscript file
  3. The Huffman Code for Compression
    1. The Huffman Algorithm
    2. Program to Color Java Source Programs
    3. Two Distinct Huffman Codes for the Same File
  4. The Hamming Code for Error Correction
  5. Coping with Decimal Numbers
    1. U.S. Banking Scheme
    2. IBM Scheme
    3. ISBN mod 11 Scheme
    4. Mod 97 Scheme
    5. Hamming mod 11 Scheme, Error Correction
    6. Hamming mod 11 Scheme, Double Errors
  6. Verhoeff's Decimal Detection
    1. Use of the Dihedral Group
    2. Verhoeff's Scheme
Part III: Introduction to Cryptography

  1. Cryptograms and Terminology
    1. Cryptogram Program
  2. The One-Time Pad
    1. Caesar Cipher
    2. Beale Cipher
    3. Generate a One-time Pad
    4. The Pad Generated Postscript    PDF
    5. Wheels used to encrypt/decrypt with a one-time pad:
      Outer wheel: Postscript,   PDF,   Postscript source
      Inner wheel: Postscript,    PDF,    Postscript source
    6. Conventional Block Cipher Cryptosystems
    7. Conventional Stream Cipher Cryptosystems
  3. Conventional Block Cipher Cryptosystems
  4. Conventional Stream Cipher Cryptosystems

Part IV: Public Key Cryptography

  1. Public Key Distribution Systems
  2. Public Key Cryptography
  3. The RSA Cryptosystem
    1. RSA Implementation
    2. Faster RSA, Using Chinese Remainder Theorem
  4. Rabin's Version of RSA
    1. Square Roots mod n = p*q
  5. Elliptic Curve Cryptosystems
  6. Other Public Key Cryptosystems
Part V: Random Number Generation

  1. Traditional Random Number Generators
  2. Perfect Random Number Generators
  3. Random Numbers From Chaos Theory
    1. The Logistic Lattice as a RNG
Part VI: The Advanced Encryption Standard (AES)

  1. Introduction to the AES
  2. The Finite Field GF(256)
    1. Generate Multiplication Tables
    2. Compare Multiplication Results
  3. The S-Boxes
    1. Generate AES Tables
  4. Key Expansion
  5. Encryption
    1. AES Encryption
  6. Decryption
    1. AES Decryption
    2. Test Runs of the AES Algorithm
Part VII: Hash Functions and Digital Signatures

  1. Hash Functions
  2. Cryptographically Secure Hash Functions
  3. Digital Signatures

Part VIII: Randomization Techniques

  1. Simple Randomization
  2. More Complex Tricks
  3. The Rip van Winkle Cipher and Rabin's Scheme

Part IX: Key distribution and Threshold Schemes

  1. Introduction
  2. Symmetric-key Distribution Systems Using Trusted Third Parties
  3. Public Key Distribution Systems Without Trusted Third Parties
  4. Threshold Schemes


Revision date: 2002-02-25. (Please use ISO 8601, the International Standard.)