title: RSA cryptosystem
body: <p>Hi i am trying to set up an RSA cryptosystem i have all the values except d selected prime numbers: <code>p=1889</code>, <code>q=2003</code>, <code>n=3783667</code>, <code>phi=3779776</code>, <code>e= 61</code></p>
  
  <p>i got stuck finding d could anyone help me to figure it out?</p>
  
  <p>Setting up an RSA cryptosystem</p>
  
  <ul>
  <li>Two large distinct prime numbers <code>p</code> and <code>q</code> are selected, and <code>n = pq</code> and <code>Φ(n) = (p − 1)(q − 1)</code> are calculated.</li>
  <li><p>An integer <code>e</code> is selected such that <code>gcd(Φ(n), e) = 1</code> and the multiplicative inverse <code>d = e^(−1)</code> in <code>ZΦ(n)</code> is calculated, i.e.</p>
  
  <p>ed ≡ 1 (mod Φ(n)).</p></li>
  <li><p>The numbers <code>p</code>, <code>q</code>, and <code>Φ(n)</code>, are then discarded.</p></li>
  <li>The pair <code>(e, n)</code> is published as the public encryption key</li>
  <li>The number <code>d</code> is the secret decryption key.</li>
  </ul>