title: if 13* D = 1 mod 60 then D = 37 how?
body: <p>I am solving an example problem, <a href="http://en.wikipedia.org/wiki/RSA_(algorithm)" rel="nofollow noreferrer">RSA algorithm</a><br>
  I have been given two prime numbers 7 and 11. Let's say <code>p=7</code> and <code>q=11</code><br>
  I have to calculate the decryption key, <code>d</code>, for some encryption key, <code>e</code>.</p>
  
  <p>Firstly I calculated <code>n=p*q</code> which implies that <code>n=77</code>.</p>
  
  <p>Suppose that <b><code>e=13</code></b>,<br>
  to calculate <code>d</code> I used the formula <code>d*e = 1 mod fi</code>,
  where <code>fi=(p-1)(q-1)</code>, and so <code>fi=60</code></p>
  
  <p>The final equation becomes <code>13*d = 1 mod fi</code><br></p>
  
  <p>According to some solved example
  <code>d</code> is calculated to be 37, how is this result obtained? </p>
  
  <p>Any help would be appreciated.</p>