marcos@caus-dp.UUCP (Marcos R. Della) (11/18/87)
Hello there, I am trying to put together a minor public key system (not a totally secure system with mega large prime numbers, but a resonably small one) mainly for the method of usage, not because it is really secure... As I understand it, the public key system works on the principle of K(D(P)) = P where K is the key function and D is the decryption function. Now, I can't remember the entire algorythm, but I do remember that somehow you take your number, multiply it by your key and mod it by k*d. Is this right so far? Then you do something with your decrypt key and you should get the original number back... The big question is, what am I doing wrong and does someone have a better explination than I have? Also, if anyone has any code that would show or illustrate this better, could you post it to the net? Thanks for any help you can provide! Marcos R. Della -- ...!lll-crg -> !csustan -\ | Whatever I said doesn't ...!sdsu ----->->!polyslo!caus-dp!marcos | mean diddly as I forgot ...!ihnp4 -> !csun ----/ | it even before finishing ...!dmsd ---/ | typing it all out!!!
sysop@stech.UUCP (Jan Harrington) (11/26/87)
in article <283@caus-dp.UUCP>, marcos@caus-dp.UUCP (Marcos R. Della) says: > > Hello there, I am trying to put together a minor public key system (not a > totally secure system with mega large prime numbers, but a resonably small > one) mainly for the method of usage, not because it is really secure... > > As I understand it, the public key system works on the principle of > > K(D(P)) = P where K is the key function and > D is the decryption function. > > Now, I can't remember the entire algorythm, but I do remember that somehow > you take your number, multiply it by your key and mod it by k*d. Is this > right so far? Then you do something with your decrypt key and you should > get the original number back... > As I understand it, it works like this: Choose r as the product of two large primes, p and q. Your encryption key, e, is another prime number, relatively prime to (p-1)*(q-1). Any prime larger than p and q will do. You publish r and e. d, the decryption key is computed as: d * e mod (p-1)*(q-1) = 1 (this is the only part I'm not certain about, as I'm doing this from memory) To encrypt you do the following: P (the plain text) ^^e mod r To decrypt you do the opposite: C (cyphered text) ^^d mod r So, if anyone knows r and e they can encrypt, but without factoring r to get p and q you can't decrypt. Somebody out there should verify my formula for d. I know it's close, but I'm not confident that it's exactly right! Jan Harrington, sysop Scholastech Telecommunications ihnp4!husc6!amcad!stech!sysop or allegra!stech!sysop ******************************************************************************** Miscellaneous profundity: "No matter where you go, there you are." Buckaroo Banzai ********************************************************************************