Table of contents : Contents Preface Prologue Chapter 1: The Foundations of Encryption What Is a Cipher? Shannon’s Encryption Model The Relationship Between the Encryption Key and the Decryption Key Classic Encryption Methods Caesar Cipher Substitution Cipher Polyalphabetic Cipher Transposition Cipher Cipher Security The Substitution Cipher’s Key Space Permutation, Combination, and Frequency Analysis The Polyalphabetic Cipher’s Key Space The Transposition Cipher’s Key Space When Breaking Classical Encryption is Possible Perfectly Secure Encryption Chapter 2: Symmetric-Key Algorithms Binary Digits and Logical Operators Symmetric-Key Algorithms Stream Ciphers Block Ciphers CBC Mode DES Ciphers The Basic Configuration of a Feistel Cipher Involution Generating DES Encryption Subkeys The DES Round Function f The Full Structure of DES Encryption and Decryption 3-DES Encryption and AES Encryption An Outline of AES Simplified DES Encryption and Decryption Converting Data into Binary Generating a DES Ciphertext Perform the Initial Permutation Separate Data into Higher- and Lower-Order Bits Feistel Rounds Variant Swap the Higher- and Lower-Order Bits Perform the Final Permutation Decrypting a DES Ciphertext Perform the Initial Permutation Separate Data into Higher- and Lower-Order Bits Round 1 Round 2 Generating DES Keys Perform Permuted Choice PC–1 Rotate the Bits Perform Permuted Choice PC–2 Rotate the Bits Again Compress the Bits How Reduced DES Differs from Real DES Chapter 3: Public-Key Encryption The Basics of Public-Key Encryption Mathematical Dependencies of Public-Key Encryption One-Way Functions The Birth of RSA Encryption Prime Numbers and Integer Factorization Types of Primality Tests Modulo Operations Addition and Subtraction in Modulo Operations Multiplication and Division of Modulo Operations Fermat’s Little Theorem and Euler’s Theorem Fermat: the Father of Number Theory Fermat’s Method and Pseudoprime Numbers Euler’s Theorem The Mathematician Euler Euler Function on the Product of Two Prime Numbers The Structure of RSA Encryption RSA Encryption: Encryption and Decryption Generating an RSA Encryption Key Verifying That the Public Key e and Private Key d Work in RSA Encryption How to Make Public Keys and Private Keys Generating a Ciphertext Using RSA Decrypting a Ciphertext Using RSA Public-Key Encryption and Discrete Logarithm Problems Discrete Logarithm Problems Encryption and Decryption in ElGamal Encryption The Extended Euclidean Algorithm Calculating the Private Key in RSA Key Generation Chapter 4: Practical Applications of Encryption Hybrid Encryption Hash Functions and Message Authentication Codes Falsification Tampering Countermeasures Hash Functions Identity Fraud Identity Fraud Countermeasures Structure of Message Authentication Codes Repudiation Drawbacks of Message Authentication Codes Digital Signatures Repudiation Measures The Workings of a Digital Signature Man-in-the-Middle Attack Using Certificates to Protect Against Man-in-the-middle Attacks Public-Key Infrastructure Zero-Knowledge Interactive Proof Preparatory Stage Implementation stage (Verification Process) Methods of Identity Fraud Anti-Identity Fraud in a Zero-Knowledge Interactive Proof What Next? Pseudorandom Numbers and Encryption Security PGP SSL/TLS Quantum Cryptography Biometrics Index