RSA ENCRYPTION ???
Author Message
RSA ENCRYPTION ???

This is a multi-part message in MIME format.

--------------6089444F5C46
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Y'all,

I'm writing a program that encodes/decodes multiple files and archives
them as well, but the protection scheme (encryption) I'm currently using
just won't do 'IT' for the real market.... (using multiple random XOR
now), so I downloaded the RSA-encryption formula's from somewhere,
they're listed below, but how the h*ll do I implement such a formula
into a function or procedure, I need something like this :

var buffer : array[1..4096] of byte;
function encryptdecrypt(inbuf : buffer): buffer;
begin
bla
bla
ble
end;

These are the formula's :

--------------6089444F5C46
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="0017.pas"

(*
RSA encryption.

The encryption key is:   C = M to the power of e MOD n

where C is the encrypted byte(s)
M is the byte(s) to be encrypted
n is the product of p and q
p is a prime number ( theoretically 100 digits long )
q is a prime number ( theoretically 100 digits long )
e is a number that  gcd(e,(p-1),(q-1)) = 1

The decryption key is:   M = C to the power of d MOD n

Where C is the encrypted byte(s)
M is the original byte(s)
n is the product of p and q
p is a prime number ( must be the same as the encrypting one )
q is a prime number ( "            "           "           " )
d is the inverse of the modulo   e MOD (p-1)(q-1)

As you can see in order to crack the encrypted byte(s) you would need to know
the original prime #'s,  Even with the encryption key it would take a long time
to genetate the correct prime #'s needed....

an Example...

C = M to the power of 13 MOD 2537

2537 is the product of 43 and 59.

the decryption key is

M = C to the power of 937 MOD 2537

937 is the inverse of  13 MOD (43 - 1)(59 - 1).

*)
--------------6089444F5C46--

Sat, 05 Dec 1998 03:00:00 GMT
RSA ENCRYPTION ???

Quote:
> I'm writing a program that encodes/decodes multiple files and archives
> them as well, but the protection scheme (encryption) I'm currently using
> just won't do 'IT' for the real market.... (using multiple random XOR
> now), so I downloaded the RSA-encryption formula's from somewhere,
> they're listed below, but how the h*ll do I implement such a formula
> into a function or procedure, I need something like this :

In all likelihood you don't...  RSA still holds a patent on their
public-key technique, and until it expires in September 2000 you
can't use it without negotiating a license.  And they're very
hellish about granting those, unless you're going to front
a lot of cash.

Can't help you with the programming end... sorry.

dave

PO Box 324 Cape Girardeau MO USA 63702-0324
http://www.prairienet.org/~dsmith/dave.html
"fighting ultimate cosmic evil...
... one bean burrito at a time."

Sat, 05 Dec 1998 03:00:00 GMT
RSA ENCRYPTION ???

|> > I'm writing a program that encodes/decodes multiple files and archives
|> > them as well, but the protection scheme (encryption) I'm currently using
|> > just won't do 'IT' for the real market.... (using multiple random XOR
|> > now), so I downloaded the RSA-encryption formula's from somewhere,
|> > they're listed below, but how the h*ll do I implement such a formula
|> > into a function or procedure, I need something like this :
|> >
|>
|> In all likelihood you don't...  RSA still holds a patent on their
|> public-key technique, and until it expires in September 2000 you
|> can't use it without negotiating a license.  And they're very
|> hellish about granting those, unless you're going to front
|> a lot of cash.
|>
|> Can't help you with the programming end... sorry.
|>
|> dave

The patent is valid only the USA, where it is possible to patent up to 12 months after publication.
AFAIK, no other country has this bizarre arrangement. This is why the international version of PGP
may be used everywhere *except* the USA.

Applied Cryptography, 2nd Edition, by Bruce Schneier, published by Wiley, is an extremely useful book,
even though all the algorithms are in C. The mathematics are explained really well.

Tom Brock.

--

The views expressed herein are mine, not Rover's, but I'm working on it.

Tue, 08 Dec 1998 03:00:00 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages