Currently I'm reading about RSA and have a trouble understanding the following formula: $$e \cdot d \equiv 1 (\mod (p-1)(q-1)) $$ From Wikipedia I know that for a given positive integer $n$, two integer $a$ and $b$ are called congruent modulo $n$ if $a$ and $b$ have the same remainder when divided by $n$. But! If you take a reminder of $1$ divided but any $n>1$, the remainder will be $1$. That is, we can simplify he first formula to be: $$(e \cdot d) \mod ((p-1)(q-1)) = 1 $$ Are these formulas equivalent?
Asked
Active
Viewed 737 times
1
-
1These are two ways of writing exactly the same thing. – Noam Aug 01 '16 at 19:12
-
2Strictly speaking, that second thing doesn't mean anything in standard mathematical notation. However, partly because of exposure to programming, people will know what you intend by the second thing. And the two meanings are equivalent. (The reason is that $1$ is less than $(p-1)(q-1)$, so when you divide it by $(p-1)(q-1)$ you just get $1$ back as the remainder.) – Ian Aug 01 '16 at 19:18
1 Answers
3
$a \equiv b\pmod n\,$ means $\,n\mid a-b,\ $ i.e. $\,a-b = nk,\,$ for some integer $k$.
$(a\bmod n) = b\ $ means the above plus $\,0\le b < n,\,$ i.e. $\,b\,$ is the least natural $\equiv a\pmod n$ or, equivalently, $\,b\,$ is the remainder left when dividing $\,a\,$ by $\,n.\,$
In your case $\,b = 1 < n\,$ is always true so they are always equivalent. But for larger $\,b\,$ this is not true, e.g. $\, 0 \equiv 2\pmod 2\,$ but $\,(0\bmod 2)\ne 2.$
Congruence relations are often more convenient for theory, whereas normal forms (such as produced by the mod operator) are often more convenient for computation. But it is best to be proficient with the use of both, and to be able to quickly convert back-and-forth between the two as need be.
Bill Dubuque
- 282,220
-
Note $\ $ Above I presume the typical convention that the modulus $,n\ge 2,$ in elementary number theory. Later in algebra it will prove convenient to also alllow moduli (ideals) that are $0$ or $1.\ $ – Bill Dubuque Aug 01 '16 at 20:26
-