home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / RSA2.PAS < prev    next >
Pascal/Delphi Source File  |  1996-08-05  |  1KB  |  38 lines

  1. RSA encryption.
  2.  
  3.  The encryption key is:   C = M to the power of e MOD n
  4.  
  5.          where C is the encrypted byte(s)
  6.                M is the byte(s) to be encrypted
  7.                n is the product of p and q
  8.                p is a prime number ( theoretically 100 digits long )
  9.                q is a prime number ( theoretically 100 digits long )
  10.                e is a number that  gcd(e,(p-1),(q-1)) = 1
  11.  
  12.   The decryption key is:   M = C to the power of d MOD n
  13.  
  14.          Where C is the encrypted byte(s)
  15.                M is the original byte(s)
  16.                n is the product of p and q
  17.                p is a prime number ( must be the same as the encrypting one )
  18.                q is a prime number ( "            "           "           " )
  19.                d is the inverse of the modulo   e MOD (p-1)(q-1)
  20.  
  21.  
  22. As you can see in order to crack the encrypted byte(s) you would need to know
  23. the original prime #'s,  Even with the encryption key it would take a long time
  24. to genetate the correct prime #'s needed....
  25.  
  26. an Example...
  27.  
  28.            C = M to the power of 13 MOD 2537
  29.  
  30.          2537 is the product of 43 and 59.
  31.  
  32.    the decryption key is
  33.  
  34.            M = C to the power of 937 MOD 2537
  35.  
  36.        937 is the inverse of  13 MOD (43 - 1)(59 - 1).
  37.  
  38.