Linked e-resources
Details
Table of Contents
Intro
Learning and Experiencing Cryptography with CrypTool and SageMath
Contents
Preface
Acknowledgments
Introduction
The CrypTool Book
The Programs CrypTool 1, CrypTool 2, and JCrypTool
The Programs on CrypTool-Online (CTO)
MysteryTwister
The SageMath Computer-Algebra System
Chapter 1 Ciphers and Attacks Against Them
1.1 Importance of Cryptology
1.2 Symmetric Encryption
1.2.1 AES
1.2.2 Current Status of Brute-Force Attacks on Symmetric Algorithms
1.3 Asymmetric Encryption
1.4 Hybrid Procedures
1.5 Kerckhoffs' Principle
1.6 Key Spaces: A Theoretical and Practical View
1.6.1 Key Spaces of Historic Cipher Devices
1.6.2 Which Key Space Assumptions Should Be Used
1.6.3 Conclusion of Key Spaces of Historic Cipher Devices
1.7 Best Known Attacks on Given Ciphers
1.7.1 Best Known Attacks Against Classical Ciphers
1.7.2 Best Known Attacks Against Modern Ciphers
1.8 Attack Types and Security Definitions
1.8.1 Attack Parameters
1.8.2 Indistinguishability Security Definitions
1.8.3 Security Definitions
1.9 Algorithm Types and Self-Made Ciphers
1.9.1 Types of Algorithms
1.9.2 New Algorithms
1.10 Further References and Recommended Resources
1.11 AES Visualizations/Implementations
1.11.1 AES Animation in CTO
1.11.2 AES in CT2
1.11.3 AES with OpenSSL at the Command Line of the Operating System
1.11.4 AES with OpenSSL within CTO
1.12 Educational Examples for Symmetric Ciphers UsingSageMath
1.12.1 Mini-AES
1.12.2 Symmetric Ciphers for Educational Purposes
References
Chapter 2 Paper-and-Pencil and Precomputer Ciphers
2.1 Transposition Ciphers
2.1.1 Introductory Samples of Different Transposition Ciphers
2.1.2 Column and Row Transposition
2.1.3 Further Transposition Algorithm Ciphers
2.2 Substitution Ciphers.
2.2.1 Monoalphabetic Substitution
2.2.2 Homophonic Substitution
2.2.3 Polygraphic Substitution
2.2.4 Polyalphabetic Substitution
2.3 Combining Substitution and Transposition
2.4 Further P&
P Methods
2.5 Hagelin Machines as Models for Precomputer Ciphers
2.5.1 Overview of Early Hagelin Cipher Machines
2.5.2 Hagelin C-52/CX-52 Models
2.5.3 Hagelin Component in CT2
2.5.4 Recap on C(X)-52: Evolution and Influence
2.6 Ciphers Defined by the American Cryptogram Association
2.7 Examples of Open-Access Publications on Cracking Classical Ciphers
2.8 Examples Using SageMath
2.8.1 Transposition Ciphers
2.8.2 Substitution Ciphers
2.8.3 Cryptanalysis of Classical Ciphers with SageMath
References
Chapter 3 Historical Cryptology
3.1 Introduction
3.2 Analyzing Historical Ciphers: From Collection to Interpretation
3.3 Collection of Manuscripts and Creation of Metadata
3.4 Transcription
3.4.1 Manual Transcription
3.4.2 CTTS: Offline Tool for Manual Transcription
3.4.3 Automatic Transcription
3.4.4 The Future of Automatic Transcription
3.5 Cryptanalysis
3.5.1 Tokenization
3.5.2 Heuristic Algorithms for Cryptanalysis
3.5.3 Cost Functions
3.6 Contextualization and Interpretation: Historical and Philological Analysis
3.6.1 Analysis of Historical Languages (Linguistic Analysis)
3.6.2 Historical Analysis and Different Research Approaches
3.7 Conclusion
References
Chapter 4 Prime Numbers
4.1 What Are Prime Numbers?
4.2 Prime Numbers in Mathematics
4.3 How Many Prime Numbers Are There?
4.4 The Search for Extremely Large Primes
4.4.1 The 20+ Largest Known Primes
4.4.2 Special Number Types: Mersenne Numbers and Mersenne Primes
4.5 Prime Number Tests
4.5.1 Special Properties of Primes for Tests
4.5.2 Pseudoprime Numbers.
4.6 Special Types of Numbers and the Search for a Formula for Primes
4.6.1 Mersenne Numbers f (n) = 2n 1 for n Prime
4.6.2 Generalized Mersenne Numbers f (k
n) = k 2n 1 for n Prime and kSmall Prime/Proth Numbers
4.6.3 Generalized Mersenne Numbers f (b
n) = bn 1 / The CunninghamProject
4.6.4 Fermat Numbers Fn = f (n) = 22n+1
4.6.5 Generalized Fermat Numbers f (b
n) = b2n+1
4.6.6 Idea Based on Euclid's Proof: p1 p2 : : : pn +1
4.6.7 As Above but 1 except +1: p1 p2 : : : pn 1
4.6.8 Euclid Numbers en = e0 e1 : : : en 1 +1 with n 1 and e0 := 1
4.6.9 f (n) = n2 +n +41
4.6.10 f (n) = n2 79n +1601 and Heegner Numbers
4.6.11 Polynomial Functions f (x) = an xn +an 1xn 1 + +a1x1 +a0(ai 2 Z, n 1)
4.6.12 Catalan's Mersenne Conjecture
4.6.13 Double Mersenne Primes
4.7 Density and Distribution of the Primes
4.8 Outlook
4.9 Notes about Primes
4.9.1 Proven Statements and Theorems about Primes
4.9.2 Arithmetic Prime Sequences
4.9.3 Unproven Statements, Conjectures, and Open Questions about Primes
4.9.4 The Goldbach Conjecture
4.9.5 Open Questions about Twin Primes
4.9.6 Prime Gaps
4.9.7 Peculiar and Interesting Things about Primes
4.10 Number of Prime Numbers in Various Intervals
4.11 Indexing Prime Numbers: nth Prime Number
4.12 Orders of Magnitude and Dimensions in Reality
4.13 Special Values of the Binary and Decimal Systems
4.14 Visualization of the Quantity of Primes in Higher Ranges
4.14.1 The Distribution of Primes
4.15 Examples Using SageMath
4.15.1 Some Basic Functions about Primes Using SageMath
4.15.2 Check Primality of Integers Generated by Quadratic Functions
References
Chapter 5 Introduction to Elementary Number Theory with Examples
5.1 Mathematics and Cryptography
5.2 Introduction to Number Theory.
5.2.1 Convention and Notation
5.3 Prime Numbers and the First Fundamental Theorem of Elementary Number Theory
5.4 Divisibility, Modulus and Remainder Classes
5.4.1 Divisibility
5.4.2 The Modulo Operation: Working with Congruences
5.5 Calculations with Finite Sets
5.5.1 Laws of Modular Calculations
5.5.2 Patterns and Structures (Part 1)
5.6 Examples of Modular Calculations
5.6.1 Addition and Multiplication
5.6.2 Additive and Multiplicative Inverses
5.6.3 Raising to the Power
5.6.4 Fast Calculation of High Powers (Square and Multiply)
5.6.5 Roots and Logarithms
5.7 Groups and Modular Arithmetic in Zn and Z
5.7.1 Addition in a Group
5.7.2 Multiplication in a Group
5.8 Euler Function, Fermat's Little Theorem, and Euler-Fermat
5.8.1 Patterns and Structures (Part 2)
5.8.3 The Theorem of Euler-Fermat
5.8.4 Calculation of the Multiplicative Inverse
5.8.5 How Many Private RSA Keys d Are There Modulo 26
5.9 Multiplicative Order and Primitive Roots
5.10 Proof of the RSA Procedure with Euler-Fermat
5.10.1 Basic Idea of Public-Key Cryptography and Requirements for Encryption Systems
5.10.2 How the RSA Procedure Works
5.10.3 Proof that RSA Fulfills Requirement 1 (Invertibility)
5.11 Regarding the Security of RSA Implementations
5.12 Regarding the Security of the RSA Algorithm
5.12.1 Complexity
5.12.2 Security Parameters Because of New Algorithms
5.12.3 Forecasts about Factorization of Large Integers
5.12.4 Status Regarding Factorization of Specific Large Numbers
5.12.5 Further Research Results about Factorization and Prime Number Tests
5.13 Applications of Asymmetric Cryptography Using Numerical Examples
5.13.1 Problem Description for Nonmathematicians
5.13.2 The Diffie-Hellman Key-Exchange Protocol
5.14 The RSA Procedure with Specific Numbers.
5.14.1 RSA with Small Prime Numbers and with a Number as Message
5.14.2 RSA with Slightly Larger Primes and a Text of Uppercase Letters
5.14.3 RSA with Even Larger Primes and a Text Made up of ASCII Characters
5.14.4 A Small RSA Cipher Challenge, Part 1
5.14.5 A Small RSA Cipher Challenge, Part 2
5.15 Didactic Comments on Modulo Subtraction
5.16 Base Representation and Base Transformation of Numbers and Estimation of Length of Digits
5.16.1 b-adic Sum Representation of Positive Integers
5.16.2 Number of Digits to Represent a Positive Integer
5.16.3 Algorithm to Compute the Base Representation
5.17 Examples Using SageMath
5.17.1 Addition and Multiplication Tables Modulo m
5.17.2 Fast Exponentiation
5.17.3 Multiplicative Order
5.17.4 Primitive Roots
5.17.5 RSA Examples with SageMath
5.17.6 How Many Private RSA Keys d Exist within a Given Modulo Range?
5.17.7 RSA Fixed Points m 2 f1
:::
n 1g with me = m mod n
References
Chapter 6 The Mathematical Ideas Behind Modern Asymmetric Cryptography
6.1 One-Way Functions with Trapdoor and Complexity Classes
6.2 Knapsack Problem as a Basis for Public-Key Procedures
6.2.1 Knapsack Problem
6.2.2 Merkle-Hellman Knapsack Encryption
6.3 Decomposition into Prime Factors as a Basis for Public-Key Procedures
6.3.1 The RSA Procedure
6.3.2 Rabin Public-Key Procedure 1979
6.4 The Discrete Logarithm as a Basis for Public-Key Procedures
6.4.1 The Discrete Logarithm in Zp
6.4.2 Diffie-Hellman Key Agreement
6.4.3 ElGamal Public-Key Encryption Procedure in Z p
6.4.4 Generalized ElGamal Public-Key Encryption Procedure
6.5 The RSA Plane
6.5.1 Definition of the RSA Plane
6.5.2 Finite Planes
6.5.3 Lines in a Finite Plane
6.5.4 Lines in the RSA Plane
6.5.5 Alternative Choice of Representatives.
6.5.6 Points on the Axes and Inner Points.
Learning and Experiencing Cryptography with CrypTool and SageMath
Contents
Preface
Acknowledgments
Introduction
The CrypTool Book
The Programs CrypTool 1, CrypTool 2, and JCrypTool
The Programs on CrypTool-Online (CTO)
MysteryTwister
The SageMath Computer-Algebra System
Chapter 1 Ciphers and Attacks Against Them
1.1 Importance of Cryptology
1.2 Symmetric Encryption
1.2.1 AES
1.2.2 Current Status of Brute-Force Attacks on Symmetric Algorithms
1.3 Asymmetric Encryption
1.4 Hybrid Procedures
1.5 Kerckhoffs' Principle
1.6 Key Spaces: A Theoretical and Practical View
1.6.1 Key Spaces of Historic Cipher Devices
1.6.2 Which Key Space Assumptions Should Be Used
1.6.3 Conclusion of Key Spaces of Historic Cipher Devices
1.7 Best Known Attacks on Given Ciphers
1.7.1 Best Known Attacks Against Classical Ciphers
1.7.2 Best Known Attacks Against Modern Ciphers
1.8 Attack Types and Security Definitions
1.8.1 Attack Parameters
1.8.2 Indistinguishability Security Definitions
1.8.3 Security Definitions
1.9 Algorithm Types and Self-Made Ciphers
1.9.1 Types of Algorithms
1.9.2 New Algorithms
1.10 Further References and Recommended Resources
1.11 AES Visualizations/Implementations
1.11.1 AES Animation in CTO
1.11.2 AES in CT2
1.11.3 AES with OpenSSL at the Command Line of the Operating System
1.11.4 AES with OpenSSL within CTO
1.12 Educational Examples for Symmetric Ciphers UsingSageMath
1.12.1 Mini-AES
1.12.2 Symmetric Ciphers for Educational Purposes
References
Chapter 2 Paper-and-Pencil and Precomputer Ciphers
2.1 Transposition Ciphers
2.1.1 Introductory Samples of Different Transposition Ciphers
2.1.2 Column and Row Transposition
2.1.3 Further Transposition Algorithm Ciphers
2.2 Substitution Ciphers.
2.2.1 Monoalphabetic Substitution
2.2.2 Homophonic Substitution
2.2.3 Polygraphic Substitution
2.2.4 Polyalphabetic Substitution
2.3 Combining Substitution and Transposition
2.4 Further P&
P Methods
2.5 Hagelin Machines as Models for Precomputer Ciphers
2.5.1 Overview of Early Hagelin Cipher Machines
2.5.2 Hagelin C-52/CX-52 Models
2.5.3 Hagelin Component in CT2
2.5.4 Recap on C(X)-52: Evolution and Influence
2.6 Ciphers Defined by the American Cryptogram Association
2.7 Examples of Open-Access Publications on Cracking Classical Ciphers
2.8 Examples Using SageMath
2.8.1 Transposition Ciphers
2.8.2 Substitution Ciphers
2.8.3 Cryptanalysis of Classical Ciphers with SageMath
References
Chapter 3 Historical Cryptology
3.1 Introduction
3.2 Analyzing Historical Ciphers: From Collection to Interpretation
3.3 Collection of Manuscripts and Creation of Metadata
3.4 Transcription
3.4.1 Manual Transcription
3.4.2 CTTS: Offline Tool for Manual Transcription
3.4.3 Automatic Transcription
3.4.4 The Future of Automatic Transcription
3.5 Cryptanalysis
3.5.1 Tokenization
3.5.2 Heuristic Algorithms for Cryptanalysis
3.5.3 Cost Functions
3.6 Contextualization and Interpretation: Historical and Philological Analysis
3.6.1 Analysis of Historical Languages (Linguistic Analysis)
3.6.2 Historical Analysis and Different Research Approaches
3.7 Conclusion
References
Chapter 4 Prime Numbers
4.1 What Are Prime Numbers?
4.2 Prime Numbers in Mathematics
4.3 How Many Prime Numbers Are There?
4.4 The Search for Extremely Large Primes
4.4.1 The 20+ Largest Known Primes
4.4.2 Special Number Types: Mersenne Numbers and Mersenne Primes
4.5 Prime Number Tests
4.5.1 Special Properties of Primes for Tests
4.5.2 Pseudoprime Numbers.
4.6 Special Types of Numbers and the Search for a Formula for Primes
4.6.1 Mersenne Numbers f (n) = 2n 1 for n Prime
4.6.2 Generalized Mersenne Numbers f (k
n) = k 2n 1 for n Prime and kSmall Prime/Proth Numbers
4.6.3 Generalized Mersenne Numbers f (b
n) = bn 1 / The CunninghamProject
4.6.4 Fermat Numbers Fn = f (n) = 22n+1
4.6.5 Generalized Fermat Numbers f (b
n) = b2n+1
4.6.6 Idea Based on Euclid's Proof: p1 p2 : : : pn +1
4.6.7 As Above but 1 except +1: p1 p2 : : : pn 1
4.6.8 Euclid Numbers en = e0 e1 : : : en 1 +1 with n 1 and e0 := 1
4.6.9 f (n) = n2 +n +41
4.6.10 f (n) = n2 79n +1601 and Heegner Numbers
4.6.11 Polynomial Functions f (x) = an xn +an 1xn 1 + +a1x1 +a0(ai 2 Z, n 1)
4.6.12 Catalan's Mersenne Conjecture
4.6.13 Double Mersenne Primes
4.7 Density and Distribution of the Primes
4.8 Outlook
4.9 Notes about Primes
4.9.1 Proven Statements and Theorems about Primes
4.9.2 Arithmetic Prime Sequences
4.9.3 Unproven Statements, Conjectures, and Open Questions about Primes
4.9.4 The Goldbach Conjecture
4.9.5 Open Questions about Twin Primes
4.9.6 Prime Gaps
4.9.7 Peculiar and Interesting Things about Primes
4.10 Number of Prime Numbers in Various Intervals
4.11 Indexing Prime Numbers: nth Prime Number
4.12 Orders of Magnitude and Dimensions in Reality
4.13 Special Values of the Binary and Decimal Systems
4.14 Visualization of the Quantity of Primes in Higher Ranges
4.14.1 The Distribution of Primes
4.15 Examples Using SageMath
4.15.1 Some Basic Functions about Primes Using SageMath
4.15.2 Check Primality of Integers Generated by Quadratic Functions
References
Chapter 5 Introduction to Elementary Number Theory with Examples
5.1 Mathematics and Cryptography
5.2 Introduction to Number Theory.
5.2.1 Convention and Notation
5.3 Prime Numbers and the First Fundamental Theorem of Elementary Number Theory
5.4 Divisibility, Modulus and Remainder Classes
5.4.1 Divisibility
5.4.2 The Modulo Operation: Working with Congruences
5.5 Calculations with Finite Sets
5.5.1 Laws of Modular Calculations
5.5.2 Patterns and Structures (Part 1)
5.6 Examples of Modular Calculations
5.6.1 Addition and Multiplication
5.6.2 Additive and Multiplicative Inverses
5.6.3 Raising to the Power
5.6.4 Fast Calculation of High Powers (Square and Multiply)
5.6.5 Roots and Logarithms
5.7 Groups and Modular Arithmetic in Zn and Z
5.7.1 Addition in a Group
5.7.2 Multiplication in a Group
5.8 Euler Function, Fermat's Little Theorem, and Euler-Fermat
5.8.1 Patterns and Structures (Part 2)
5.8.3 The Theorem of Euler-Fermat
5.8.4 Calculation of the Multiplicative Inverse
5.8.5 How Many Private RSA Keys d Are There Modulo 26
5.9 Multiplicative Order and Primitive Roots
5.10 Proof of the RSA Procedure with Euler-Fermat
5.10.1 Basic Idea of Public-Key Cryptography and Requirements for Encryption Systems
5.10.2 How the RSA Procedure Works
5.10.3 Proof that RSA Fulfills Requirement 1 (Invertibility)
5.11 Regarding the Security of RSA Implementations
5.12 Regarding the Security of the RSA Algorithm
5.12.1 Complexity
5.12.2 Security Parameters Because of New Algorithms
5.12.3 Forecasts about Factorization of Large Integers
5.12.4 Status Regarding Factorization of Specific Large Numbers
5.12.5 Further Research Results about Factorization and Prime Number Tests
5.13 Applications of Asymmetric Cryptography Using Numerical Examples
5.13.1 Problem Description for Nonmathematicians
5.13.2 The Diffie-Hellman Key-Exchange Protocol
5.14 The RSA Procedure with Specific Numbers.
5.14.1 RSA with Small Prime Numbers and with a Number as Message
5.14.2 RSA with Slightly Larger Primes and a Text of Uppercase Letters
5.14.3 RSA with Even Larger Primes and a Text Made up of ASCII Characters
5.14.4 A Small RSA Cipher Challenge, Part 1
5.14.5 A Small RSA Cipher Challenge, Part 2
5.15 Didactic Comments on Modulo Subtraction
5.16 Base Representation and Base Transformation of Numbers and Estimation of Length of Digits
5.16.1 b-adic Sum Representation of Positive Integers
5.16.2 Number of Digits to Represent a Positive Integer
5.16.3 Algorithm to Compute the Base Representation
5.17 Examples Using SageMath
5.17.1 Addition and Multiplication Tables Modulo m
5.17.2 Fast Exponentiation
5.17.3 Multiplicative Order
5.17.4 Primitive Roots
5.17.5 RSA Examples with SageMath
5.17.6 How Many Private RSA Keys d Exist within a Given Modulo Range?
5.17.7 RSA Fixed Points m 2 f1
:::
n 1g with me = m mod n
References
Chapter 6 The Mathematical Ideas Behind Modern Asymmetric Cryptography
6.1 One-Way Functions with Trapdoor and Complexity Classes
6.2 Knapsack Problem as a Basis for Public-Key Procedures
6.2.1 Knapsack Problem
6.2.2 Merkle-Hellman Knapsack Encryption
6.3 Decomposition into Prime Factors as a Basis for Public-Key Procedures
6.3.1 The RSA Procedure
6.3.2 Rabin Public-Key Procedure 1979
6.4 The Discrete Logarithm as a Basis for Public-Key Procedures
6.4.1 The Discrete Logarithm in Zp
6.4.2 Diffie-Hellman Key Agreement
6.4.3 ElGamal Public-Key Encryption Procedure in Z p
6.4.4 Generalized ElGamal Public-Key Encryption Procedure
6.5 The RSA Plane
6.5.1 Definition of the RSA Plane
6.5.2 Finite Planes
6.5.3 Lines in a Finite Plane
6.5.4 Lines in the RSA Plane
6.5.5 Alternative Choice of Representatives.
6.5.6 Points on the Axes and Inner Points.