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

CFB and OFB Stream Ciphers Implemented in JCE

This section describes how DES CFB and OFB (Output FeedBack) stream ciphers are implemented in the JDK JCE package.

Sun has implemented stream cipher modes for both CFB and OFB modes, but with restrictions that the feedback sizes must be multiples of 8 bits. To use CFB or OFB in a stream cipher mode, you need to specify the feedback size in bits right after the mode name when calling Cipher.getInstance(algorithm) to create a cipher object like:

Cipher cObj1 = Cipher.getInstance("DES/CFB8/NoPadding"); Cipher cObj2 = Cipher.getInstance("DES/CFB16/NoPadding"); Cipher cObj3 = Cipher.getInstance("DES/CFB24/NoPadding"); ... Cipher cObja = Cipher.getInstance("DES/OFB8/NoPadding"); Cipher cObjb = Cipher.getInstance("DES/OFB16/NoPadding"); Cipher cObjc = Cipher.getInstance("DES/OFB24/NoPadding"); ...

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)