Caesar cipher in number theory

204 Views Asked by At

Why is the caesar cipher given by: $C\equiv P+k\,(mod\,26) \,$with$ \,0 \leq \,$C$\,\leq25$?

For me is this more logic: $C\equiv P+k\,(mod\,26) \,$with$ \,0 \leq \,$P$\,\leq25$

Because of the modulo 26 it's alwas true that $ \,0 \leq \,$C$\,\leq25$.

1

There are 1 best solutions below

11
On BEST ANSWER

When we write

$$ C \equiv P +k \pmod{m} $$

we mean that $C$ and $P+k$ are congruent modulo $m$. That is, they leave the same remainder when divided by $m$. For each integer $P+k$ there are infinitely many integers that are congruent to it modulo 26. So, that expression alone does not fix an encoding scheme. If, however, one specifies that $C$ has to be between $0$ and $25$ (included), then there's only one choice of $C$ for every choice of $P+k$.

If $P$ is also constrained to the same interval, then for a fixed choice of $k$ we have an invertible map that may be used for encryption and decryption.

There's another "mod," which may be the source of confusion here. When we write $x \bmod m$, we mean the unique number between $0$ and $m-1$ that is congruent to $x$ modulo $m$. However, the presence of $\equiv$ and the parentheses around the mod expression are clear signs that here we are dealing with the relation symbol, rather than with the binary operation symbol.