Contents

Foreword - 1

Foreword - 2

Preface

Acknowledgements

CHAPTER 1 Cryptography

1.1 Overview of Cryptography

1.2 Security Trends

1.3 The Open Systems Interconnection Security Architecture

1.4 Security Attacks

1.4.1 Passive Attacks

1.4.2 Active Attacks

1.5 Security Services

1.5.1 Authentication

1.5.2 Access Control

1.5.3 Data Confidentiality

1.5.4 Non-repudiation

1.5.5 Data Integrity

Key Terms

Summary

Summary

References

CHAPTER 2 Mathematics of Modern Cryptography

2.1 Basic Number Theory

2.1.1 Basic Notations

2.1.2 Congruence

2.1.3 Modular Exponentiation

2.1.4 Greatest Common Divisor Computation

2.2 Chinese Remainder Theorem

2.2.1 Secure Multicasting using CRT

2.2.2 Implementation of CRT in JAVA

2.3 Fermat’s and Euler’s Theorem

2.4 Algebraic Structure

2.4.1 Group

2.4.2 Ring

2.4.3 Field

2.4.4 Galois Fields

2.4.5 Legendre and Jacobi Symbols

2.4.6 Continued Fraction

2.5 Primality Testing Methods

2.5.1 Naive Algorithm

2.5.2 Sieve of Eratosthenes Method

2.5.3 Fermat’s Primality Test

2.5.4 Miller–Rabin Primality Test

2.6 Factorization

2.6.1 Prime Factorization Method

2.6.2 Trial Division Method

2.6.3 Fermat’s Factorization Method

2.6.4 Pollard’s rho Method

Key Terms

Summary

Summary

CHAPTER 3 Classical Encryption Techniques

3.1 Conventional Encryption

3.1.1 The Conventional Encryption Model

3.1.2 Types of Attacks

3.2 Substitution Techniques

3.2.1 Caesar Cipher (Z+n)74

3.2.2 Affine Cipher (Z*n)76

3.2.3 Playfair Cipher

3.2.4 Vigenere Cipher

3.2.5 Vernam One-Time Pad Cipher

3.2.6 Hill Cipher (Z*n)83

3.3 Transposition Techniques

3.3.1 Rail Fence Cipher

3.3.2 Column Transposition

3.4 Steganography

3.4.1 Modern Steganography Techniques

3.4.2 Attacks on Steganography

3.4.3 Applications

3.5 Linear Feedback Shift Registers

3.5.1 Linear Recurrence Relation

3.5.2 LFSR Operation

Key Terms

Summary

Summary

CHAPTER 4 Data Encryption Standard

4.1 Simplified Data Encryption Standard

4.1.1 S-DES Encryption

4.1.2 Key Expansion Process

4.1.3 S-DES Decryption

4.2 Data Encryption Standard

4.2.1 DES Encryption and Decryption

4.2.2 DES Key Expansion

4.2.3 DES Decryption

4.3 Strength of DES

4.3.1 Brute-force Attack

4.3.2 Differential Cryptanalysis

4.3.3 Linear Cryptanalysis

4.4 Modes of Operation

4.4.1 Electronic Code Book Mode

4.4.2 Cipher Block Chaining Mode

4.4.3 Cipher Feedback Mode

4.4.4 Output Feedback Mode

4.4.5 Counter Mode

Key Terms

Summary

Summary

References

Chapter 5 Secure Block Cipher and Stream Cipher Technique

5.1 Need for Double DES and Triple DES

5.2 Double DES

5.2.1 Meet-in-the-Middle Attack

5.2.2 Attacking Scenario

5.3 Triple DES

5.4 Pseudo Random Number Generator

5.4.1 Linear Congruential Generator

5.4.2 Blum Blum Shub Generator

5.5 RC

5.5.1 Principle of RC

5.5.2 The Key-scheduling Algorithm

5.5.3 The Pseudo Random Generation Algorithm

5.5.4 Encryption and Decryption

5.6 RC

5.6.1 Principles of RC

5.6.2 RC5 Key Expansion

5.6.3 RC5 Encryption

5.6.4 RC5 Decryption

5.7 International Data Encryption Algorithm

5.7.1 Principles of IDEA

5.7.2 Key Expansion

5.7.3 IDEA Encryption and Decryption

5.8 Blowfish Encryption

5.8.1 Principles of Blowfish

5.8.2 Key Expansion

5.8.3 Encryption and Decryption

5.9 CAST-128172

5.9.1 CAST-128 Algorithm

5.9.2 Strength of CAST

5.10 RC

5.10.1 Key Expansion Process

5.10.2 Encryption Algorithm

5.10.3 Decryption Operation

Key Terms

Summary

Summary

References

Chapter 6 Advanced Encryption Standard (AES)187

6.1 AES Introduction (GF(2n))187

6.2 Working Principle of the AES

6.3 AES Encryption and Decryption

6.4 AES Key Expansion Algorithm

6.5 AES Exercises Based on GF (28)197

Key Terms

Summary

Summary

References

Chapter 7 Public Key Cryptosystem

7.1 Introduction to Public-Key Cryptosystem

7.2 RSA Algorithm

7.3 Attacks on RSA

7.3.1 Brute-Force Attack

7.3.2 Mathematical Attack

7.3.3 Timing Attack

7.4 JAVA Implementation of RSA

7.5 Knapsack Cryptosystem

7.5.1 Definition

7.5.2 Superincreasing Knapsack

7.5.3 Encryption and Decryption Algorithm for Knapsack Cryptosystem

7.5.4 Secret Communication using Knapsack

Key Terms

Summary

Summary

References

Chapter 8 Key Management and Key Distribution

8.1 Introduction to Key Management

8.2 Centralized vs Distributed Key Management

8.2.1 Key Generation

8.2.2 Key Distribution

8.2.3 Key Updating

8.3 Diffie–Hellman Key Exchange

8.3.1 Diffie–Hellman Key Exchange Algorithm

8.3.2 Discrete Logarithms

8.4 Computing Discrete Logarithms

8.4.1 Baby Step, Giant Step

8.4.2 Index Calculus

8.5 Man-In-The-Middle Attack

8.6 JAVA Implementation of Diffie–HellmanKey Exchange Algorithm

8.7 Secure Multicast Communication Based onDiffie–Hellman Key Exchange

8.7.1 Introduction

8.7.2 Key Computation Protocol

8.8 Computation-Efficient Secure Multicast KeyManagement Based on Greatest Common Divisor

8.8.1 Introduction

8.8.2 Clustered Tree-based Key ManagementScheme

8.9 JAVA Implementation of Secure Multicast KeyManagement Based on GCD

Key Terms

Summary

Summary

References

Chapter 9 Elliptic Curve Cryptography

9.1 Introduction

9.2 ECC Arithmetic

9.2.1 Elliptic Curve Operations

9.2.2 Geometric Description of Addition

9.2.3 Arithmetic Description of Point Addition

9.2.4 Point Multiplication

9.2.5 Elliptic Curve Over Zp261

9.3 Diffie–Hellman Key Exchange using Elliptic Curves

9.4 Elgamal Cryptosystem using Elliptic Curves

9.5 ECC-Based Elgamal Digital Signature

Key Terms

Summary

Summary

References

Chapter 10 Authentication Techniques

10.1 Message Authentication

10.1.1 Message AuthenticationRequirements

10.1.2 Message Authentication Functions

10.2 Hash Functions

10.2.1 Requirements of Hash Functions

10.2.2 Security of Hash Functions

10.3 Message Authentication Code

10.3.1 Requirements of MAC

10.3.2 Security of MAC

10.4 Authentication Algorithms

10.4.1 MD

10.4.2 Secure Hash Algorithms

10.4.3 Birthday Attacks

10.4.4 RIPEMD-160282

10.4.5 Hash Message Authentication Code

10.4.6 Whirlpool

Key Terms

Summary

Summary

Chapter 11 Digital Signature

11.1 Introduction to Digital Signature

11.1.1 Uses of Digital Signature

11.1.2 Comparison of Digital Signature withDigital Certificate

11.1.3 Digital Signature Standard

11.2 Digital Signature Schemes

11.2.1 ElGamal Signature Scheme299

11.2.2 DSA Signature Scheme

11.2.3 RSA Signature Scheme

11.2.4 Fiat–Shamir Signature Scheme

11.2.5 Lamport Signature Scheme

11.2.6 Chaum–Antwerpen Undeniable Signature Scheme

11.2.7 Chaum’s Blind Signature Scheme

11.2.8 Ong–Schnorr–Shamir Subliminal ChannelSignature Scheme

11.2.9 Heyst–Pedersen Signature Scheme

11.2.10 Probabilistic Signature Scheme

11.3 Batch Digital Signature Algorithm

11.3.1 Naccache et al. Batch Verification Algorithm

11.3.2 Lim and Lee’s Attack

11.4 Attacks On Digital Signature

11.4.1 Problem

11.4.2 Attacks

11.5 Merits and Demerits of Digital Signature Schemes

11.6 Java Implementation of DSA

11.6.1 History

11.6.2 DSA Implementation using JCA

11.6.3 Security Considerations while ImplementingDigital Signature

11.6.4 Simple Batch Processing of DSA

Key Terms

Summary

Summary

Chapter 12 Authentication Applications

12.1 Kerberos

12.1.1 Kerberos Terminologies

12.1.2 Kerberos Version 4328

12.1.3 Kerberos Version 5330

12.2 X.509 Authentication Services

12.2.1 X.509 Formats

12.2.2 Version 3 X.509 Certificates

12.3 Public Key Infrastructure

12.3.1 PKI Management Model

12.3.2 PKI Management Operations

Key Terms

Summary

Summary

Chapter 13 Application Layer Security

13.1 Web Security

13.1.1 Web Security Threats and Countermeasures

13.2 Secure Electronic Transaction

13.2.1 Actors in SET

13.2.2 Functionality of SET

13.2.3 SET Algorithms

13.3 E-Mail Security

13.3.1 Pretty Good Privacy

13.3.2 Secure/Multipurpose Internet Mail Extensions 349

13.4 Case Study

13.4.1 Case Study of PGP

13.4.2 Case Study of S/MIME

13.5 Secure Hypertext Transfer Protocol

Key Terms

Summary

Summary

Chapter 14 Transport Layer Security

14.1 Secure Socket Layer

14.1.1 SSL Architecture

14.1.2 Working of SSL

14.1.3 SSL Applications

14.1.4 Issues in SSL

14.2 Wired TLS 362

14.2.1 TLS Architecture

14.2.2 Working of TLS

14.2.3 TLS Applications

14.2.4 Issues in TLS

14.3 Wireless Transport Layer Security

14.3.1 WTLS Architecture

14.3.2 Working of the WTLS

14.3.3 WTLS Applications 366

14.3.4 Issues in the WTLS

14.4 Comparison of SSL and TLS 367

Key Terms

Summary

Summary

Chapter 15 IP Security

15.1 IP Security

15.1.1 IP Security Overview

15.2 IP Security Architecture

15.2.1 IP Security Policy

15.3 IP Datagram

15.4 IPsec Authentication Header

15.4.1 AH Format

15.4.2 AH Datagram Placement and Linking

15.5 IPsec Encapsulating Security Payload

15.5.1 ESP Format

15.5.2 ESP Field Calculation and Placement

15.6 Applications of IPsec

15.7 Security Issues with IPsec

Key Terms

Summary

Summary

Chapter 16 System Security

16.1 Password

16.1.1 Password Management

16.1.2 Password Usage

16.1.3 Password Management System 384

16.2 Program Security

16.2.1 Malware

16.2.2 Malware Propagation 385

16.2.3 Malware Detection 386

16.2.4 Viruses

16.2.5 Case Study

16.3 OS Security

16.3.1 Operating System

16.3.2 Trusted OSs

16.3.3 Security Policies

16.3.4 Features of Trusted OS

16.3.5 The Attacks on the System

16.3.6 Models of Security

16.3.7 Design of a Trusted OS

16.4 Network Security

16.4.1 Intrusion Detection System

16.4.2 Firewall

16.4.3 Types of Firewall 398

16.5 Database Security

16.5.1 DB Security Requirements

16.5.2 DB Vulnerabilities and Attacks

16.5.3 SQL Injection

16.5.4 SQL Injection Countermeasures

Key Terms

Summary

Summary

Appendix: Frequently Asked University Questions with Solutions