How to solve Chinese Remainder Theorem

Click For Summary

Discussion Overview

The discussion revolves around solving problems related to the Chinese Remainder Theorem (CRT) in the context of cryptography. Participants present various equations and seek assistance in finding solutions, while also addressing the conditions necessary for applying the CRT.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Tron Orino Yeong presents several equations to solve using CRT, specifically focusing on modular arithmetic.
  • Some participants note that the modulo numbers must be co-prime for CRT to apply, pointing out that in the first problem, 3 and 9 are not co-prime, which complicates finding a solution.
  • One participant suggests that since the second equation implies the first, it can be omitted to satisfy the co-primality condition.
  • Another participant discusses the implications of the equations, indicating that if the first equation had a different value, it might not be possible to satisfy both equations.
  • Concerns are raised about the correctness of the proposed solutions, with specific calculations being challenged and corrections suggested.
  • Participants express uncertainty regarding the existence of solutions for the quadratic equations presented in problems (3) and (4), with checks indicating no solutions exist under the given conditions.

Areas of Agreement / Disagreement

Participants generally agree on the necessity of the co-primality condition for CRT but disagree on the implications of the specific equations presented. The discussion remains unresolved regarding the existence of solutions for the quadratic equations.

Contextual Notes

Limitations include the dependence on the co-primality of the modulo numbers and unresolved calculations in the proposed solutions. The discussion highlights the need for careful verification of modular conditions.

vokoyo
Messages
9
Reaction score
0
Dear

How to solve the CRT for cryptography as below -

(1) Find x such that

x = 2(mod3)
x = 5(mod9)
x = 7(mod11)

(2) Find x such that

x = 2(mod3)
x = 4(mod7)
x = 5(mod11)

(3) Find x such that x^2 = 26(mod77)

(4) Find x such that x^2 = 38(mod77)

Please help me by provide your advice and suggestion

Prayerfully
Tron Orino Yeong
 
Mathematics news on Phys.org
I have edited your post to remove the blank space above and below the content, and to remove the personal information for your protection.
 
Please provide your sample solution so that I can improve my calculus skills
 
vokoyo said:
Dear

How to solve the CRT for cryptography as below -

(1) Find x such that

x = 2(mod3)
x = 5(mod9)
x = 7(mod11)

(2) Find x such that

x = 2(mod3)
x = 4(mod7)
x = 5(mod11)

Hi Tron Orino Yeong, welcome to MHB! ;)

Let's start with the first 2 problems.

To apply CRT we need that the modulo numbers are co-prime.
For (1) we can observe that the second equation x=5(mod 9) implies the first equation.
So we can leave out the first equation, reducing it to a standard CRT problem.
Problem (2) already has co-prime modulo numbers, meaning it's already a standard CRT problem.

The general solution for CRT (assuming co-prime $m_i$) is:
$$\begin{cases}x\equiv a_1\pmod{m_1}\\ ... \\ x\equiv a_k\pmod{m_k}\end{cases} \quad\Rightarrow\quad
x\equiv \left[\frac M{m_1}\right]^{-1}_{m_1}\frac M{m_1}\cdot a_1 + ... + \left[\frac M{m_k}\right]^{-1}_{m_k}\frac M{m_k}\cdot a_k \pmod{M}$$
where $M=m_1\cdot ...\cdot m_k$ and $\left[\frac M{m_i}\right]^{-1}_{m_i}$ is the multiplicative inverse modulo $m_i$.

How about applying the formula to find the solutions?
 
vokoyo said:
Dear

How to solve the CRT for cryptography as below -

(1) Find x such that

x = 2(mod3)
x = 5(mod9)
x = 7(mod11)
First note that 3 divides 9 so there may not be a solution. In fact, if x= 5 (mod 9) then x= 5+ 9n for some integer n. But then x= 5+ 9n= 2 (mod 3) since 9= 0 (mod 3).

Putting x= 5+ 9n into the third equation, x= 5+ 9n= 7 (mod 11) so 9n= 2 (mod 11). That says that 9n= 2+ 11m for some integer m. That is equivalent to 9n- 11m= 2. But 11- 9= 2 so it is sufficient to take n= m= -1. But then n= -1+ 11k and m= -1+ 9k is also a solution for any k: 9(-1+ 11k)- 11(-1+ 9k)= -9+ 99k+ 11- 99k= 2 for all k.

Set n in x= 5+ 9n equal to -1+ 11k gives x= 5+ 9(-1+ 11k)= -4+ 99k.
If you don't like negative numbers, change k by 1: -4+ 99+ 99k= 95+ 99k.
2) Find x such that

x = 2(mod3)
x = 4(mod7)
x = 5(mod11)

(3) Find x such that x^2 = 26(mod77)

(4) Find x such that x^2 = 38(mod77)

Please help me by provide your advice and suggestion

Prayerfully
Tron Orino Yeong
 

Attachments

  • 123.jpg
    123.jpg
    71.7 KB · Views: 157
  • My own solution.jpg
    My own solution.jpg
    13.6 KB · Views: 131
Last edited:
The approach is correct.
However, a precondition of CRT is not met.
That is, it requires that the $m_i$ are pairwise co-prime.
Since $m_1=3$ and $m_2=9$ are not co-prime, we need to do something about that first.

Observe that any solution of the second equation with $m_2=9$ satisfies the first equation (with $m_1=3$).
So if we leave out the first equation completely, we will find the same solutions, and we satisfy the precondition of CRT.
 
The first two equations are x= 2 (mod 3) and x= 5 (mod 9). The second equation means that x= 5+ 9m for some integer m. But then we can write x= 2+ 3+ 9m= 2+ 3(3m+1) so the first equation is also satisfied. If that had been any number but "2" in the first equation there would be no x satisfying both equations.

For example, if x= 1 (mod 3) then x= 1+ 3n. Putting that into x= 5(mod 9) we would have 1+ 3n= 5+ 9m or 3(n- 3m)= 4. But the left side is a multiple of 3 and the right side isn't.
 
Please check for my solution draft paper -
 

Attachments

  • 投影片1.JPG
    投影片1.JPG
    22.2 KB · Views: 127
  • 投影片2.JPG
    投影片2.JPG
    22.6 KB · Views: 130
  • #10
Please help me for question (3) and question (4)

View attachment 8501

(I need urgent assistance for this exercise)
 

Attachments

  • 投影片1.JPG
    投影片1.JPG
    22.6 KB · Views: 133
  • #11
Did you check by filling in your solutions in the original equations?

You should find that (1) does not fit.
Your solution is wrong, because the set of equations does not satisfy the precondition of CRT that the $m_i$ must be co-prime.

You should find that (2) does not fit.
Everything is correct, except for a calculation mistake at the very end.
It should be:
$$308+396+1050 \equiv 1754 \equiv 137 \pmod{231}$$

I'm not quite sure what you did for (3).
Your approach seems to be correct, but in the first step, we should have:
$$x^2\equiv 26 \pmod{77} \quad\Rightarrow\quad x^2\equiv 26 \equiv 5 \pmod {7}$$
Checking $x\equiv 0,1,2,3,4,5,6 \pmod{7}$ shows that there is no solution.

Same thing for (4).
$$x^2\equiv 38 \pmod{77} \quad\Rightarrow\quad x^2\equiv 38 \equiv 3 \pmod {7}$$
Checking $x\equiv 0,1,2,3,4,5,6 \pmod{7}$ shows that there is no solution either.
 
  • #12
A million thanks to all of you
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 5 ·
Replies
5
Views
8K
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K