Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgments
- 1 Introduction
- 2 Modular Arithmetic
- 3 The Addition Cypher, an Insecure Block Cypher
- 4 Functions
- 5 Probability Theory
- 6 Perfect Secrecy and Perfectly Secure Cryptosystems
- 7 Number Theory
- 8 Euclid's Algorithm
- 9 Some Uses of Perfect Secrecy
- 10 Computational Problems, Easy and Hard
- 11 Modular Exponentiation, Modular Logarithm, and One-Way Functions
- 12 Diffie and Hellman's Exponential-Key-Agreement Protocol
- 13 Computationally Secure Single-Key Cryptosystems
- 14 Public-Key Cryptosystems and Digital Signatures
- Further Reading
- Index
8 - Euclid's Algorithm
Published online by Cambridge University Press: 05 July 2014
- Frontmatter
- Contents
- Preface
- Acknowledgments
- 1 Introduction
- 2 Modular Arithmetic
- 3 The Addition Cypher, an Insecure Block Cypher
- 4 Functions
- 5 Probability Theory
- 6 Perfect Secrecy and Perfectly Secure Cryptosystems
- 7 Number Theory
- 8 Euclid's Algorithm
- 9 Some Uses of Perfect Secrecy
- 10 Computational Problems, Easy and Hard
- 11 Modular Exponentiation, Modular Logarithm, and One-Way Functions
- 12 Diffie and Hellman's Exponential-Key-Agreement Protocol
- 13 Computationally Secure Single-Key Cryptosystems
- 14 Public-Key Cryptosystems and Digital Signatures
- Further Reading
- Index
Summary
In Section 4.3.3 of Chapter 4, we introduced the notion of modular multiplicative inverses: for a modulus m, two integers a and b are mod-m multiplicative inverses if a · b ≡ 1 (mod m). In Section 4.3.4, we demonstrated a method for finding mod-m multiplicative inverses: write down the mod-m multiplication table for all mod-m representatives, and search for ones in the table. In Section 4.3.5, we observed that, for the modulus 6, some integers don't have multiplicative inverses, even integers that are not congruent mod-6 to 0. The method we present in this chapter will explain this phenomenon.
In this chapter, we describe a good algorithm for calculating modular multiplicative inverses. The algorithm is an extension of one attributed to the classical mathematician Euclid, who supposedly lived around 300 B.C. He is known primarily for his contribution to and systematization of geometry, but his famous book Elements also addressed number theory.
The measuring puzzle
Suppose you are given two containers and told how many cups of water each one can hold. You are also given an empty basin that can hold an unlimited amount of water. What is the smallest positive number of cups you can leave in the basin by using these two containers? The rules of the puzzle allow you to fill either container with water either from the tap or the basin, and to pour the water from the container either down the drain or into the basin.
- Type
- Chapter
- Information
- A Cryptography PrimerSecrets and Promises, pp. 89 - 105Publisher: Cambridge University PressPrint publication year: 2014