O'Reilly logo

Cryptography in C and C++, Second Edition by Michael Welschenbach

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Modular Arithmetic: Calculating with Residue Classes

Every fine story must leave in the mind of the sensitive reader an intangible residuum of pleasure...

—Willa Cather, Not Under Forty, "Miss Jewett"

We begin this chapter with a discussion of the principle of division with remainder. In relation to this we shall explain the significance of these remainders, their possible applications, and how one calculates with them. In order for the functions to be introduced later to be understandable, we begin with a bit of algebra.

We have seen that in division with remainder of an integer a € • by a natural number 0 < m € • one has the unique representation

Equation 5.1. 

Here r is called the remainder after division of a by m or the residue of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required