Modular Congruence

Last modified: 2023-09-02

Cryptography Math Modular Arithmetic

Basic

In modular congruence, the following rules apply:

If `a ≡ b mod c`, then `b ≡ a mod c`

So if we have the following problem,

39 ≡ x mod 8

To find x value, we can calculate it as below using Python.

x = 39 % 8
print(x)