-1
$\begingroup$

given these two modulo equations $c_1 = m_1^a (\mod n)$, $c_2 = m_2^a (\mod n)$

Where '$a$' is prime and $n$ is a product of two primes, and the only unknown is $n$, is it possible to solve for $n$? I thought maybe you would have to use the Chinese remainder theorem but I am not sure how to apply it here.

$\endgroup$

1 Answer 1

-1
$\begingroup$

$c_1 \equiv m_1^a \mod n$ says $n$ divides $m_1^a - c_1$. Similarly for $c_2 \equiv m_2^a \mod n$. So you want $n$ to divide $\text{gcd}(m_1^a - c_1, m_2^a-c_2)$. If there are two primes that do so, take their product.

$\endgroup$
1
  • $\begingroup$ thanks for your fast reply. The issue is that I am dealing with incredibly large integers, so was hoping there was a way to find those two primes without trial and error. $\endgroup$
    – Kyle
    Commented Feb 19, 2023 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .