JCE DES Operation Mode Testing Program Result

This section provides testing results of a tutorial example program to test DES operation modes implemented in the JDK JCE package.

I used my testing program, JceSunDesOperationModeTest.java, to test the cases listed in the http://www.itl.nist.gov/fipspubs/fip81.htm:

herong> javac JceSunDesOperationModeTest.java

herong> echo Test with ECB
herong> java JceSunDesOperationModeTest 1
Key     : 0123456789ABCDEF
Message : 4E6F77206973207468652074696D6520666F7220616C6C20
Cipher  : 3FA40E8A984D48156A271787AB8883F9893D51EC4B563B53
Expected: 3FA40E8A984D43156A271787AB8883F9893D51EC4B563B53

herong> echo Test with CBC
herong> java JceSunDesOperationModeTest 2
Key     : 0123456789ABCDEF
IV      : 1234567890ABCDEF
Message : 4E6F77206973207468652074696D6520666F7220616C6C20
Cipher  : E5C7CDDE872BF27C43E934008C389C0F683788499A7C05F6
Expected: E5C7CDDE872BF27C43E934008C389C0F683788499A7C05F6

herong> echo Test with CFB
herong> java JceSunDesOperationModeTest 3
Key     : 0123456789ABCDEF
IV      : 1234567890ABCDEF
Message : 4E6F77206973207468652074696D6520666F7220616C6C20
Cipher  : F3096249C7F46E51A69E839B1A92F78403467133898EA622
Expected: F3096249C7F46E51A69E839B1A92F78403467133898EA622

herong> echo Test with OFB
herong> java JceSunDesOperationModeTest 4
Key     : 0123456789ABCDEF
IV      : 1234567890ABCDEF
Message : 4E6F77206973207468652074696D6520666F7220616C6C20
Cipher  : F3096249C7F46E5135F24A242EEB3D3F3D6D5BE3255AF8C3
Expected: F3096249C7F46E5135F24A242EEB3D3F3D6D5BE3255AF8C3

Outputs of the first 3 test cases match well with the expected values documented in http://www.itl.nist.gov/fipspubs/fip81.htm. The output of the last test case can not be compared, since it is not documented in FIPS 81.

Table of Contents

 About This Book

 Cryptography Terminology

 Cryptography Basic Concepts

 Introduction to AES (Advanced Encryption Standard)

 Introduction to DES Algorithm

 DES Algorithm - Illustrated with Java Programs

 DES Algorithm Java Implementation

 DES Algorithm - Java Implementation in JDK JCE

DES Encryption Operation Modes

 DES Encryption Operation Mode Introduction

 What is ECB (Electronic CodeBook) Operation Mode?

 What is CBC (Cipher Block Chaining) Operation Mode?

 What is CFB (Cipher FeedBack) Operation Mode?

 What is OFB (Output FeedBack) Operation Mode?

 DES Operation Modes in JCE

 JCE DES Operation Mode Testing Program

JCE DES Operation Mode Testing Program Result

 DES in Stream Cipher Modes

 PHP Implementation of DES - mcrypt

 Blowfish - 8-Byte Block Cipher

 Secret Key Generation and Management

 Cipher - Secret Key Encryption and Decryption

 Introduction of RSA Algorithm

 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

 MD5 Mesasge Digest Algorithm

 SHA1 Mesasge Digest Algorithm

 OpenSSL Introduction and Installation

 OpenSSL Generating and Managing RSA Keys

 OpenSSL Managing Certificates

 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

 Using Certificates in Google Chrome

 Using Certificates in Firefox

 Archived Tutorials

 References

 Full Version in PDF/EPUB