title: rsa algorithm:Can anybody be kind enough to explain me whats happening
body: <pre><code>#include &lt;string.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;math.h&gt;
  
  int mult(unsigned int x, unsigned int y, unsigned int n) {
      unsigned long int k = 1;
      int j;
      for (j = 1; j &lt;= y; j++)
          k = (k * x) % n;
      return (unsigned int) k;
  }
  
  void main() {
      char msg[100];
      unsigned int pt[100], ct[100], n, d, e, p, q, i;
      printf("Enter message : ");
      gets(msg);
      //strcpy(pt, msg);
      for (i = 0; i &lt; strlen(msg); i++)
          pt[i] = msg[i];
      n = 253;
      d = 17;
      e = 13;
      printf("\nCT = ");
      for (i = 0; i &lt; strlen(msg); i++)
          ct[i] = mult(pt[i], e, n);
      for (i = 0; i &lt; strlen(msg); i++)
          printf("%d ", ct[i]);
      printf("\nPT = ");
      for (i = 0; i &lt; strlen(msg); i++)
          printf("%c", pt[i]);
      for (i = 0; i &lt; strlen(msg); i++)
          pt[i] = mult(ct[i], d, n);
  }
  </code></pre>
  
  <p>This is simple program for implementing RSA algorithm can anybody explain me what's happening here and why particularly n=253, d=17 , e=13.</p>
  
  <p>Help would be much appreciated.</p>