Cryptography Tutorials - Herong's Tutorial Examples - v5.42, by Herong Yang
DES Operation Modes in JCE
This section describes what DES operation modes are implemented in the JDK JCE package, and how to use them.
Sun has implemented all 4 operation modes described above in their JDK JCE (Java Cryptography Extension) package. To use DES operation modes properly, you need to:
1. Specify the operation mode name as part of the algorithm name when calling Cipher.getInstance(algorithm) to create a cipher object like:
Cipher cObj1 = Cipher.getInstance("DES/ECB/NoPadding"); Cipher cObj2 = Cipher.getInstance("DES/CBC/NoPadding"); Cipher cObj3 = Cipher.getInstance("DES/CFB/NoPadding"); Cipher cObj4 = Cipher.getInstance("DES/OFB/NoPadding");
2. Initialize the cipher object with the key and the IV (Initial Vector) by using the IvParameterSpec class like:
AlgorithmParameterSpec apsObj = new IvParameterSpec(theIV); cObj.init(Cipher.ENCRYPT_MODE, keyObj, apsObj);
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
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?
JCE DES Operation Mode Testing Program
JCE DES Operation Mode 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 Google Chrome