I Have the following problem:
Let $n_1 = ab$ and $n_2 = ac$, where $a$, $b$, $c$ are 8-bit prime numbers. You are given that $n_1 ≡ 7905 \pmod{13337}$ and $n_2 ≡ 4186 \pmod{ 13337}$. Find $a$, $b$, $c$. Also the number 13337 is prime.
I have no clue what kind of theorem I need to use in order to solve this problem, but I have found that the $\gcd(7905,4186)=1$. So they are relatively prime. Also I have the prime factorization of $7905 = 3 \times 5 \times 17 \times 31$ and of $4186 = 2 \times 7 \times 13 \times 23$, if that helps.
As I understand all of the $a$,$b$,$c$ are primes between $2$ and $255$ since they are of 8-bits, but I am wondering if there is another way other than a brute force calculation method.
I was thinking that The Chinese Remainder Theorem could be used but the solution that I will find for the $a$ prime will still have $b$ and $c$ in it, so that's why I do not know how to solve it!
Thank you in advance for all the responses!
A simple brute-force approach:
Which gives only one solution: $a = 229$, $b = 151$, and $c = 193$.
If you prefer a less brute-force approach, consider the value of $n_1 + n_2 = ab + ac = a(b + c)$. We know two things about it:
Combining these two statements, we get $0 \le k \le 8$. This gives us 9 possible options of what $n_1 + n_2 = a(b + c)$ could be:
We can rule out those that would require a factor larger than $502$ (the maximum allowed value of $b + c$), leaving:
Since $a$ must be a prime factor of one of these numbers, then:
$$a \in \{ 2, 3, 5, 13, 19, 37, 43, 107, 109, 113, 163, 229, 239 \}$$
However, $a = \frac{n_1 + n_2}{b + c} \ge \frac{12091}{251 + 251} \approx 24.085657$, so this restricts the possible values to:
$$a \in \{ 37, 43, 107, 109, 113, 163, 229, 239 \}$$
Limiting the possibilities to:
But as mentioned previously, having $b + c > 502$ is impossible.
Also, the only way for two primes ($b$ and $c$ to add up to an odd number is for one of them to be $2$). And since $111 = 3 \times 37$ and $105 = 3 \times 5 \times 7$ are not prime, then the solutions with $b + c = 113$ or $b + c = 107$ are ruled out. We're now down to four possible solutions:
Now, let's solve for $b$ using $ab ≡ 7905 \pmod{13337}$.
Now the only potential solution is $(a = 229, b = 151, c = 193)$. And it can be easily verified that all three numbers are prime, and that $n_2 \equiv 4186 \pmod{13337}$. Therefore, this is the unique solution to the problem.