Number Theoretical Ciphers Probability Permutations and Choices
25 25 26
xiii
xiv
Contents
Chapter 3
Dependence Fun with Poker The Birthday Paradox Cryptographic Hashes Number Theory Refresher Course Divisibility and Prime Numbers Congruences Algebra Refresher Course Definitions Finite Field Inverses Factoring-Based Cryptography The RSA Algorithm Discrete Logarithm-Based Cryptography The Diffie-Hellman Algorithm Elliptic Curves Addition of Points Elliptic Curve Cryptography Elliptic Curve Diffie-Hellman Summary Exercises
Factoring and Discrete Logarithms Factorization Algorithm Theory Notation A Crash Course in Python Exponential Factoring Methods Brute-Force Analysis Fermat's Difference of Squares Analysis of Fermat's Difference of Squares Pollard's p Analysis of Pollard's p Pollard's p - 1 Analysis of Pollard's p — 1 Square Forms Factorization Analysis of SQUFOF Elliptic Curve Factorization Method Analysis ofECM Subexponential Factoring Methods Continued Fraction Factorization Analysis of CFRAC Sieving Methods Discrete Logarithms Brute-Force-Methods Baby-Step Giant-Step Method Baby-Step Giant-Step Analysis
Contents PoUard's p for Discrete Logarithms Analysis of PoUard's p for Discrete Logarithms PoUard's X for Discrete Logarithms Analysis of PoUard's X Index Calculus Mcthod Summary Exercises
Chapter 4
Block Ciphers Operations on Bits, Bytes, Words Operations Code Product Ciphers Substitutions and Permutations S-Box P-Box Shift Registers Substitution-Permutation Network EASY1 Cipher Python Implementation Feistel Structures DES DES Key Schedule DES Round Function Triple DES DESX FEAL S-function Key-Generating Function: f^ Round Function: f Key Scheduling Blowfish Blowfish Key Schedule Blowfish Algorithm Blowfish Round Function Notes on Blowfish AES / Rijndael Rijndael Encryption Algorithm SubBytes ShiftRows MixColumns AddRoundKey Rijndael Decryption Algorithm Key Expansion Notes on Rijndael Block Cipher Modes Electronic Code Book
Linear Cryptanalysis Overview Matsui's Algorithms Linear Expressions for S-Boxes Matsui's Piling-up Lemma Easyl Cipher Linear Expressions and Key Recovery
167 168 169 171 174 175 179
Contents Linear Cryptanalysis of DES Multiple Linear Approximations Finding Linear Expressions Linear Cryptanalysis Code Summary Exercises