I am trying to find the decryption key of a given RSA problem. I have never solved equations using modulus, and I cannot seem to wrap my head around the equation to find the decryption key.
I am trying to solve this equation:
$43 * d = 1 mod 60$
I know the basics of modulus and therefore know that $1 \mod 60$ equals 1. I then, wrongly, substitute $1 mod 60$ by $1$ and simplify the equation like this:
$43 * d = 1$
However, I know that this is wrong, as I checked the answer sheet and there were a couple of answers, one being 301. I know that 301 is divisible by 43. The reasoning in the answer says "We need to find a number d that, when multiplied by 43 and divided by 60 leaves a remainder of 1." But in my head I ask "Why would we need to do that? I can solve 1 mod 60 and it is 1."
What did I do wrong by assuming $1 \mod 60$ equals $1$ and substituting that in the formula?
Edit: I have wrongly tagged this question as cryptography as I didn't know what tag to file this under. I welcome any edit that can fix the tag!
The "equation" you have there should be written $43d\equiv 1\pmod{60}$. Note the symbol: three horizontal lines, not the two lines of equality. It is read as "$43d$ is congruent to $1$ modulo $60$". It means that $43d-1$ is an integer multiple of $60$. Solving this "congruence" amounts then to finding integers $d$ and $e$ with $43d-1=60e$. We can re-arrange this as $43d-60e=1$.
The extended Euclidean algorithm gives a way of solving such two-variable equations. In this example we find a solution $d=7$, $e=5$ which gives $d\equiv7\pmod{60}$ as the solution to the congruence.