Steps of Using DES Algorithm in JDK JCE

This section describes how to use DES algorithm provided in the JDK JCE package. Steps include building a secret key object from key material; creating and initializing a cipher object.

To use DES algorithm in the JDK JCE package, we need to use several JCE classes and follow the steps:

1. Creating a DESKeySpec object from a 8-byte key material by calling the javax.crypto.spec.DESKeySpec constructor.

2. Creating a SecretKeyFactory object with DES algorithm name, mode name, and padding name by calling the javax.crypto.SecretKeyFactory.getInstance() static method.

3. Converting the DESKeySpec object to a SecretKey object through the SecretKeyFactory object by calling the javax.crypto.SecretKeyFactory.generateSecret() method.

4. Creating a Cipher object with DES algorithm name, mode name, and padding name by calling the javax.crypto.Cipher.getInstance() static method.

5. Initializing the Cipher object with the SecretKey object by calling the javax.crypto.Cipher.init() method.

6. Ciphering through input data as byte arrays by calling the javax.crypto.Cipher.update() method.

7. Finalizing the ciphering process by calling the javax.crypto.Cipher.doFinal() method.

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 Java Implementation in JDK by Sun

Steps of Using DES Algorithm in JDK JCE

 Testing DES Algorithm in JDK JCE

 What Is PKCS5Padding? - JCE DES Padding Test

 DES Encryption Operation Modes

 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


 Full Version in PDF/EPUB