title: How compute encrypt and decrypt time complexity for algorithm?
body: <p>I try calculate time complexity for the following algorithm.</p>
  
  <pre><code>private void encrypt()
  {
          M = new BigInteger(64,random);
          C = M.multiply(k).mod(N); // O(n^2)    
  }
  
  private void decrypt()
  {
          kk= k.modinverse(N); // O(n^3)
          Mp = kk.multiply(c).mod(N); //O(n^2)
  }
  </code></pre>
  
  <p>Have I calculated time complexity right?</p>
  
  <p>Where time complexity for encrypt is O(n^2)
  and time complexity for decrypt is O(n^3) + O(n^2) = O(n^3)</p>