So I have a bunch of equations that look like this:
$$k + tx \equiv a \bmod m$$
Where $t$ is the common variable I am solving for among the equations (each equation may have different values for $k,x,a,m$). Before I apply CRT I am processing the equations a bit. Is what I am doing correct:
Check if $g =\gcd(x,m)$ divides $a-k$. If not, there's no solution.
Divide everything by $g$, giving us equation $tx/g \equiv (a-k)/g \bmod m/g$, which I will relabel as $tX \equiv A \bmod M$.
Now that $X$ and $M$ are coprime, reframe as $t \equiv AX^{-1} \bmod M$, relabel as $t \equiv R \bmod M$.
At this point:
-Have I done things correctly?
-Are there any more quick "checks" I should apply or simplifications to use before I begin the CRT process to find $t$?
-Namely, do I need to do another gcd test? Finding the gcd of $R$ and $M$ and then dividing?