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

Introducting DES Stream Cipher Modes

This section describes what are DES encryption stream cipher modes and how CFB and OFB block operation modes can be modified as stream modes.

As we know from previous tutorials, DES algorithm is a block cipher algorithm. But it can be operated in different ways to become stream ciphers.

(FIPS 81) Federal Information Processing Standards Publication 81 published in 1980 defined the following 4 operation modes:

- ECB - Electronic Code Book operation mode.
- CBC - Cipher Block Chaining operation mode.
- CFB - Cipher Feedback operation mode
- OFB - Output Feedback operation mode

See http://www.itl.nist.gov/fipspubs/fip81.htm for details.

In FIPS 81, the last two operation modes, CFB and OFB, are defined in ways so that they can be used as stream ciphers.

In order to describe these operation modes, we need to define the following notations:

P = P[1], P[2], P[3], ..., P[i], ... - Representing the original plaintext message, P, being arranged into multiple 64-bit plaintext blocks. P[i] represents plaintext block number i.

E(P[i]) - Representing the DES encryption algorithm applied on a single 64-bit plaintext block, P[i], with a predefined key, k.

C = C[1], C[2], C[3], ..., C[i], ... - Representing the final ciphertext message, C, being regrouped from multiple 64-bit ciphertext blocks. C[i] represents ciphertext block number i.

IV - Called "Initial Vector", representing a predefined 64-bit initial value.

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

►Introducting DES Stream Cipher Modes

CFB (Cipher FeedBack) as a Stream Cipher

OFB (Output FeedBack) as a Stream Cipher

CFB and OFB Stream Ciphers Implemented in JCE

JCE DES Stream Ciphers Testing Program

JCE DES Stream Ciphers Testing Program Result

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)