**Cryptography Tutorials - Herong's Tutorial Examples** - Version 5.33, by Dr. Herong Yang

What Is Function?

This section describes what is function - Two sets of elements, X and Y, and a rule, f, which assigns to each element in X, to one element in Y.

**Function** - Two sets of elements, X and Y, and a rule, f, which
assigns to each element in X, to one element in Y. A function is denoted as
f: X -> Y.

**Domain** - The set of elements, X, in the above definition.

**Codomain** - The set of elements, Y, in the above definition.

If x is element in X, and y is the element in Y assigned to x by a function f, y is called the image of x, and denoted as y = f(x).

If y = f(x), x is called a preimage of y.

**Image of Function** - The set of all elements in Y which has at least one
preimage in X.

**1-1 Function** - A function that satisfies that "if x <> y, then f(x) <> f(y)".
No two elements in the domain will have the same image for a 1-1 function.

**Bijection** - A 1-1 function that satisfies that "image of f is Y".

**Inverses Function** - The function g of a bijection f that satisfies that
"if y = f(x), then x = g(y)".

**One-way Function** - A bijection that satisfies that "the computation of its
inverse function is very hard, and close to infeasible".

**Trapdoor One-way Function** - A one-way function that satisfies that
"the computation of its inverse function becomes feasible, if additional information
is given".

**Permutation** - A bijection that satisfies "f: X -> X".

**Involution** - A permutation that satisfies that "inverse function of f is f".

Table of Contents

Introduction to AES (Advanced Encryption Standard)

DES Algorithm - Illustrated with Java Programs

DES Algorithm Java Implementation

DES Algorithm - Java Implementation in JDK JCE

DES Encryption Operation Modes

PHP Implementation of DES - mcrypt

Blowfish - 8-Byte Block Cipher

Secret Key Generation and Management

Cipher - Secret Key Encryption and Decryption

RSA Implementation using java.math.BigInteger Class

Introduction of DSA (Digital Signature Algorithm)

Java Default Implementation of DSA

Private key and Public Key Pair Generation

PKCS#8/X.509 Private/Public Encoding Standards

Cipher - Public Key Encryption and Decryption

OpenSSL Introduction and Installation

OpenSSL Generating and Managing RSA Keys

OpenSSL Generating and Signing CSR

OpenSSL Validating Certificate Path

"keytool" and "keystore" from JDK

"OpenSSL" Signing CSR Generated by "keytool"

Migrating Keys from "keystore" to "OpenSSL" Key Files

Certificate X.509 Standard and DER/PEM Formats

Migrating Keys from "OpenSSL" Key Files to "keystore"

Using Certificates in IE (Internet Explorer)