Is this question valid as $n=100$ is not a product of two primes, but can be expressed as $100=2^2 5^2$, if valid is there any criteria for choosing $d$ and other values?
1 Answers
At least, there's an issue with using $n=100$ as the public modulus in RSA: that number is not squarefree. This implies that $m\mapsto m^e\bmod n$ can't be a bijection of the range $[0,n)$. And thus we must restrict the plaintext space to something lesser than $[0,n)$ if we want a deterministic decryption procedure.
Proof: if $n$ is not squarefree, there exists $s>1$ with $s^2$ dividing $n$. Let $m$ be an element of the subset $\mathcal S$ of $[0,n)$ with multiples of $s$. For $e>2$, $m^e$ is a multiple of $s^2$, which divides $n$. Therefore $s^2$ divides $m^e\bmod n$. Therefore $m^e\bmod n$ belongs to the subset $\mathcal T$ of $[0,n)$ with multiples of $s^2$. $|\mathcal S|=n/s$ and $|\mathcal T|=n/s^2$. Thus $|\mathcal S|>|\mathcal T|$. Therefore the function $f:\mathcal S\to\mathcal T, m\mapsto m^e\bmod n$ is bound to collide. Such collision is also a collision for RSA encryption on $[0,n)$.
For example, with $n=100$ and $e=13$, $m_A=65$ and $m_U=85$ both encipher to $25$. This means we can't even reversibly encipher the uppercase ASCII alphabet. If we try to use $c\mapsto c^d\bmod n$ for $d=e^{-1}\bmod\varphi(n)$ as a decryption function, it will sometime fail. For example, $m_R=82$ enciphers to $c=32$ and deciphers to $32\ne m_R$.
- 149,326
- 13
- 324
- 622